Excel file manipulation

Started by
4 comments, last by krez 12 years, 8 months ago
Whats the easyest way to change the content of an .xls file programatically.

I have a site with a MySQL database, users will fill some date and after that I need to change or create a new xls file automatically with the given data. Some xls files contains dropboxes that need to be selected and some formulas.

Thank you.

Advertisement

Whats the easyest way to change the content of an .xls file programatically.

I have a site with a MySQL database, users will fill some date and after that I need to change or create a new xls file automatically with the given data. Some xls files contains dropboxes that need to be selected and some formulas.

Thank you.






You are looking for Excel Automation. I made some software that automatically generates Excel graphics and calculates specific things. Here is a link that will get you started:

http://www.c-sharpcorner.com/uploadfile/thiagu304/excelautomation01052007080910am/excelautomation.aspx

Here is a link to the Excel Developer Center. This will show you how to use any version of Excel. Probably the better link to follow once you get started.

http://msdn.microsoft.com/en-us/office/aa905411
You could also set up your Excel file to pull data directly from the database, either on-demand or every time you open the Excel file.
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])

Whats the easyest way to change the content of an .xls file programatically.

I have a site with a MySQL database, users will fill some date and after that I need to change or create a new xls file automatically with the given data. Some xls files contains dropboxes that need to be selected and some formulas.

Thank you.




You could possibly use VBA language or if You have possiblity to use Visual Studio 2008 or newer
there is built-in feature of writing applications for MS Office.
I'd suggest finding a library that will do it for you. A quick search found http://code.google.com/p/excellibrary/ and http://www.libxl.com/ for example. That way you won't need Excel installed on your web server.
While I am not saying not to use a library, Excel can connect to a database on a remote host easily enough. So you wouldn't need to install Excel on your web server.
--- krez ([email="krez_AT_optonline_DOT_net"]krez_AT_optonline_DOT_net[/email])

This topic is closed to new replies.

Advertisement