Skip to main content
GameDev.net gamedev.net
🔒 Locked

Excel file manipulation

Started by boboS Aug 19, 2011 at 4:05 PM 4 replies 2.6k views
Original Post
boboS
boboS
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.

Wrathnut
Wrathnut

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
krez
krez
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])
Misery
Misery

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.
Adam_42
Adam_42
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.
krez
krez
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])

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.