Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Export DataSet to Excel

Hi !

I'm exporting a .Net dataset to an Excel file, using the Excel Object Model.
I'm looping through my datarows, adding them one by one to the file.

I have 2 questions.
* Is there a faster way?
* I'm having a problem when i open excel during the loop: the file that is
processing in the background, seems to open when i open excel whilst looping.
Can i avoid this ?

Thanks !
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 128
Default Export DataSet to Excel

Hi Mike,

If you are able to determine the length (i.e. last row) of your dataset it
should be faster to copy all of your data rows in one go to excel.

On My PC I am able to run a number of instances of Excel at the same time -
you may be able to find a way of running two instances of excel. I find
though that when I am importing text using vba it is safer to leave it until
it is finished as it seems to take up a lot of processing power.

Sorry if this is a bit vague, but it is just a thought.

Regards

Andi


"MiniMike" wrote in message
...
Hi !

I'm exporting a .Net dataset to an Excel file, using the Excel Object

Model.
I'm looping through my datarows, adding them one by one to the file.

I have 2 questions.
* Is there a faster way?
* I'm having a problem when i open excel during the loop: the file that is
processing in the background, seems to open when i open excel whilst

looping.
Can i avoid this ?

Thanks !



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Export DataSet to Excel

Thanks !
Could you give some little more info on how to copy all rows in one go?
Determining the length of the dataset is no problem ...
dataset.tables(0).rows.count should do the trick, doesn't it ...?

"Andibevan" wrote:

Hi Mike,

If you are able to determine the length (i.e. last row) of your dataset it
should be faster to copy all of your data rows in one go to excel.

On My PC I am able to run a number of instances of Excel at the same time -
you may be able to find a way of running two instances of excel. I find
though that when I am importing text using vba it is safer to leave it until
it is finished as it seems to take up a lot of processing power.

Sorry if this is a bit vague, but it is just a thought.

Regards

Andi


"MiniMike" wrote in message
...
Hi !

I'm exporting a .Net dataset to an Excel file, using the Excel Object

Model.
I'm looping through my datarows, adding them one by one to the file.

I have 2 questions.
* Is there a faster way?
* I'm having a problem when i open excel during the loop: the file that is
processing in the background, seems to open when i open excel whilst

looping.
Can i avoid this ?

Thanks !




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
Excel dataset size Kenallen Excel Discussion (Misc queries) 0 August 1st 07 07:54 PM
DataSet to Excel/text 11Oppidan Excel Programming 3 March 3rd 05 02:47 AM
How do I customize the X-axis in excel to match my dataset? cathy Charts and Charting in Excel 1 January 14th 05 01:25 AM
Create Excel Document from a Dataset using VB.Net Jacob Philip Excel Programming 1 February 19th 04 08:40 AM
Want to Bind ADO Dataset to Excel 2003 Pivottable Dan[_19_] Excel Programming 0 January 21st 04 01:26 PM


All times are GMT +1. The time now is 06:59 AM.

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

About Us

"It's about Microsoft Excel"