Compress Excel file after export

M

mpfohl

I have a database where the user clicks a button and it exports the 8
tables to an excel file. I've noticed that after the file is
exported, the excel file is bloated, but if i open the excel file and
resave it, the file size reduce by about half.

Is there some VB code I could use to programmatically compress the
excel file after export?

Another solution would be for me to export the tables to a csv file,
but after the export, I want the users to email the file to me and I
don't want them to have to attach 8 csv files to an email. But if
there was a way to zip the 8 files together or bundle them in some
way, that'd be a solution.

Any thoughts are appreciated.
 
R

robert.waters

I have a database where the user clicks a button and it exports the 8
tables to an excel file. I've noticed that after the file is
exported, the excel file is bloated, but if i open the excel file and
resave it, the file size reduce by about half.

Is there some VB code I could use to programmatically compress the
excel file after export?

Another solution would be for me to export the tables to a csv file,
but after the export, I want the users to email the file to me and I
don't want them to have to attach 8 csv files to an email. But if
there was a way to zip the 8 files together or bundle them in some
way, that'd be a solution.

Any thoughts are appreciated.

Why dont you use automation to duplicate the manual process? Open the
spreadsheet in code, save it, and see if that process exhibits the
same behavior.
 
M

mpfohl

My database will use Visutal Studios to produce a runtime version to
run on a user's computer even if access isn't installed. I'm worried
that if my code tries to open excel and they don't have excel
installed on their computer either, it may fail? maybe this just
becomes a matter for trial and error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top