How to import a view in .install file? I have an exported view code.How can I import it in .install file?
You don't. You implement hook_views_default_views() in yourmodule.views_default.inc and place the export there.

See Using default views in your module for a detailed guide.