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) with 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. :-)
Related
I have a mid sized code library (several thousand lines) that uses Excel Interop (Microsoft.Office.Interop.Excel).
The program that keeps a workbook open for hours at a time, and does manipulations like adding/editing text, shapes, and calling macros.
I have not once seen a Marshal.ReleaseComObject. Yet, the users don't report any problems.
In all cases, the objects go out of scope within several seconds.
So, is this a problem? How? If yes, how do I justify to management that it needs cleanup? If not, why recommend it in the first place?
It's been a while, but I did a lot of Excel automation from .NET. I never used Marshal.ReleaseComObject either. Never saw a problem.
I've got an Excel file that takes ~10 inputs and outputs ~5 numbers. The problem is, the calculations run involve lots of assumptions, are rather complex, and laid out over 5 excel sheets with lots of lookup tables, etc.
I'd like to wrap the Excel model in an iPad app -- so that it's easy to solicit user input and show the easy outputs without having them to see the dirty work beneath.
It's important for me to encapsulate the Excel model since that's still getting tweaked and adjusted... so to have a wrapper set up as opposed to reproduce the logic in the Excel file would save me probably 2 orders of magnitude of time.
Have looked around and not found a way to do this yet... any thoughts?
Thanks
Two options come to mind.
One is that you can use an excel wrapper on iOS. Details can be found here: How can i create excel sheet and file in iPhone sdk?
The second option is to setup a server and pass the task onto the server. I'm familiar with Ruby, and creating/modifying excel files in Ruby is a breeze. I'd expect PHP, python, etc. to have similar faculties.
Either option is going to depend on your use case, whether you're charging for the app or not, and your familiarity with server side programming.
I'd like to be able to edit any kind of Google docs using the API from Google App Engine.
My goal is to lose as little information as possible when editing the document. The edits are fairly simple like replacing some words.
Document
To edit them, I'm doing an export in HTML and importing it again. But we are loosing some information like notes. There is also an issue with the title, the size before each title increase at every new update, so I have to reset some css. Is there is a better way of editing docs ?
Spreadsheet
There is the spreadsheet API, so I think I'm covered.
Presentation
I did not find a format that I could export and import again. The only one seems to be powerpoint. But powerpoint files cannot be easily edited.
Drawing
I did not find a format that can be both exported and imported. I tried with SVG, but svg cannot be imported back.
Document
PDF offers you the best fidelity in and out of Google Docs, without the hassle of proprietary or complicated formats like MS Word files.
Spreadsheet
Only proprietary or complicated formats guarantee fidelity here of things like cell color. The Spreadsheets API only allows data to be updated, but not formatting.
Presentation
You are correct, PPTX is the only format that can go both in and out of Google Presentations.
Drawing
You are correct, there is no import format that can go both in and out of Google Drawings.
I have to color Calc rows, based on some string condition. So each time some string value appear in B column, the entire column is colored in certain color. It looks like on this image.
I need more strings and more conditions. How can I overcome this limitation?
Use Libreoffice 3.5 which no longer has this limitation.
For older Libreoffice version there should be an extension providing the same functionailty. Check in the Libreoffice extension repository if you can find it.
As the above answer states, LibreOffice 3.5 allows as many conditional formatting rules as you need. You just click the "add" button on the right hand side. To clear up an error in a previous post, VBA is minimally supported in Star/Open/Libre office. They have their own functions and BASIC programming rules that are similar, but most detailed VBA programs from excel spreadsheets need to be rewritten as the syntax is fairly different.
I don't know how long this link will be good for, but this is what I have been using as a guide for programming:
http://198.62.75.4/opt/sun_docs/C/solaris_10/SUNWsodoc/SO7BPG/
How do the applications transfer the copied strings into each other? Is this a clipboard usage? If so, how can i access the clipboard in a program?
Edit: I'm interested in Windows systems, I know a bit of C#, and C++.
Yes, cut-and-paste is usually done using the system-wide clipboard.
In both Windows Forms and WPF applications, there are (different) classes called 'Clipboard', which contain the stuff you need to access the system clipboard.
Basically, the clipboard allows you to put pretty much anything on to it, along with markers that say what format the data is in. You can put the same data on in lots of different formats. That's how, for example, you can cut and paste a part of a spreadsheet in Excel into Notepad - Excel has put the data onto the clipboard in both a native Excel format and a plain text format.