Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,253
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default 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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to cast com object (interop) yh Excel Discussion (Misc queries) 0 April 26th 10 09:16 AM
Immediate Fail: Launch Excel via Interop Doug Price Excel Discussion (Misc queries) 0 January 22nd 10 04:34 PM
Referencing interop assembly... Editor Excel Discussion (Misc queries) 0 April 25th 07 09:48 AM
COM interop with .NET assemblies does not work (mscoree.dll) Matthias HALDIMANN Excel Programming 0 May 26th 04 07:51 AM
How to avoid "large data on clipboard" message? keith Excel Programming 4 September 25th 03 08:44 PM


All times are GMT +1. The time now is 10:49 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"