PC Review


Reply
Thread Tools Rate Thread

Adding a row to an excel file

 
 
James Alba
Guest
Posts: n/a
 
      20th Sep 2005
Is it possible to (1) create a new excel worksheet and write to it, (2) save
and close it, AND THEN (3) reopen it and CONTINUE adding rows where you left
off? I am making an application which logs events, where each event is
written to a new row. If so, then how?

I'm using C# with .NET and MS office 2003.

Thanks in advance.


 
Reply With Quote
 
 
 
 
Steve Walker
Guest
Posts: n/a
 
      20th Sep 2005
In message <O4aW$(E-Mail Removed)>, James Alba <(E-Mail Removed)>
writes
>Is it possible to (1) create a new excel worksheet and write to it, (2) save
>and close it, AND THEN (3) reopen it and CONTINUE adding rows where you left
>off? I am making an application which logs events, where each event is
>written to a new row.


Yes. You just need somewhere to store the last row number; somewhere in
the spreadsheet, for example. Or you could iterate through the rows
until you find an empty one.

Personally, I'd write to a text file. It's easier, faster, doesn't load
the Excel Monster into memory and doesn't depend on Excel being
installed. You can always import it into Excel.

--
Steve Walker
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
adding excel file to powerpoint moh Microsoft Powerpoint 0 7th Sep 2008 03:43 PM
Adding row data from one Excel file, to another, when not existing PatK Microsoft Excel Programming 3 30th Jul 2008 12:31 AM
adding pictures to an excel file that are on a cd =?Utf-8?B?ZG9naXNudXRz?= Microsoft Excel Misc 1 27th Apr 2005 11:29 AM
Adding custom file formats to Excel? Gustaf Liljegren Microsoft Excel Programming 2 11th Jan 2005 08:29 PM
Adding a new excel file type Wim Glassee Microsoft Excel Programming 2 25th Jul 2003 10:12 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 12:18 AM.