# Microsoft Office Application Help - Excel Help forum > Excel Formulas & Functions >  >  Export single sheet in csv format?

## bluefrog

I'm looking to export a single sheet within several sheets, saving it in csv format so it can by imported in other worksheets. I will eventually record a macro for this which will be linked to a button on the page, but for now I cannot figure out how to export a single page in this format.

Thank you  :Smilie:

----------


## Shijesh Kumar

Hi,

No need to record macros.
Just Select File -> Save As
in Save as Type box , select CSV
It will save only currently selected sheet.

----------


## bluefrog

lol, sorry I forgot to mention, this has to be run from the button because it has some script which prevents it running without macros & it also has an expiry deadline, in which the save as is limited to Excel files .xls only. 

I have attached the sheet so you can take a peek and see what I mean. The save to csv button will be located in the export sheet.

----------


## Shijesh Kumar

Hi,

Delete the macros named Private Sub CustomSave(Optional SaveAs As Boolean)
and copy the below mentioned code, it will allow u to save in csv format






```
Please Login or Register  to view this content.
```

----------


## bluefrog

Thanks, but it's limited for a reason. The user isn't a member of the company so they can only save the same file back to itself or another name. All options are still available when called from VB or formula's which is why I need it to run off the button. That way when the sheets are hidden the user can still export the data from the hidden sheet to csv and import it into the new version. You see most of the data is sensitive, but the export sheet can be used throughout the company freely, which is why only one sheet can be allowed to be exported, and also why it expires. Of course most savvy folks can just recode the expiration, but the people who will be using it aren't savvy, just basic level users.

I hope this explains things a little clearer. 

PS thanks for the help so far.

----------


## bluefrog

I thnk the following code should do it but I'm getting errors.




```
Please Login or Register  to view this content.
```


Anybody any idea's?

----------

