My team leader wants me to check if this is possible.
Our app has a grid (we use TAdvStringGrid from tmssoftware) that displays some values. Our users then copy and paste to Excel. (2010) Now they want the values to update automatically when they play with Excel. In other words, I need to copy formulas similar to having a Excel sheet with values and formulas and pasting it on another sheet.
I'm thinking of exporting it as an Excel file (with some kind of excel component) 开发者_如何学Cwith the formulas but team leader first want to see if the copying will work or not.
I never worked with Excel (using Delphi) before. :-(
Thanks
Sounds like you need the TAdvSpreadGrid from TMS instead. It's an enchanced version of TAdvStringGrid that has support for the formulas as well.
If you need even more Excel Support they have TMS FlexCel Studio that is very nice.
I use TAdvSpreadGrid from TMS also. For reading and writing really spiffy spreadsheets with support for formulas, nice formatting and even pane freezing to make data editing easier for my clients, I use Native Excel. It's fast, has good documentation, and is easy to use. It's worth a look.
While the previous answers aren't wrong, I found another solution. I tried adding the calculation (e.g. =A1+B1) to the cell as plain text. When copying to Excel it accepts my formula as an Excel formula and calculates it just like I want it.
No need to splash out more money on TAdvSpreadGrid or something else. :-)
精彩评论