Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
using the clipboard to avoid VBA / Interop
It is now standard practice of mine, when creating an Excel document
programmatically, to simply create an .xls filename and the invoke it directly with a shell command. Regardless of the version of Excel the user might have or where it's installed, if it's on the machine it will grab the file because of the .xls extension, and then I can simply copy tab-delimited data to the clipboard and paste it into the sheet - keeping my application can remain completely agnostic of Excel. So my question is, I would like to be able to have this tab-delimited data be able to contain carriage returns in individual cells (right now I replace them with spaces). I can't figure out if this is possible with just cut and paste, however, as CR is a row delimiter. If that's not possible, could someone point me to a reliable example of direct Excel file creation? Again, I want to avoid any DLL reference to Excel components if at all possible. I probably want to support all the way back to Office 95. TIA, Bob |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
using the clipboard to avoid VBA / Interop
have you looked into ADO (with JET) to create the excel file? since you mention interop I assume your app can create a recordset. -- keepITcool | www.XLsupport.com | keepITcool chello nl | amsterdam Bob wrote : It is now standard practice of mine, when creating an Excel document programmatically, to simply create an .xls filename and the invoke it directly with a shell command. Regardless of the version of Excel the user might have or where it's installed, if it's on the machine it will grab the file because of the .xls extension, and then I can simply copy tab-delimited data to the clipboard and paste it into the sheet - keeping my application can remain completely agnostic of Excel. So my question is, I would like to be able to have this tab-delimited data be able to contain carriage returns in individual cells (right now I replace them with spaces). I can't figure out if this is possible with just cut and paste, however, as CR is a row delimiter. If that's not possible, could someone point me to a reliable example of direct Excel file creation? Again, I want to avoid any DLL reference to Excel components if at all possible. I probably want to support all the way back to Office 95. TIA, Bob |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
using the clipboard to avoid VBA / Interop
Eye, that it can (VB.Net). Why didn't I think of that?
Thanks :) Bob "keepITcool" wrote in message t.com... have you looked into ADO (with JET) to create the excel file? since you mention interop I assume your app can create a recordset. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Unable to cast com object (interop) | Excel Discussion (Misc queries) | |||
Immediate Fail: Launch Excel via Interop | Excel Discussion (Misc queries) | |||
Referencing interop assembly... | Excel Discussion (Misc queries) | |||
COM interop with .NET assemblies does not work (mscoree.dll) | Excel Programming | |||
How to avoid "large data on clipboard" message? | Excel Programming |