|
-
Mar 10th, 2011, 10:16 AM
#1
Thread Starter
New Member
Outputting to Excel File
Hi all 
I've been having a bit of difficulty when outputting to an excel file using my vb program. While it does output the file, it does so without any structure i.e. all the code on a line is in the same cell.
Is there anyway so that when it outputs it do so with the headers seperated then each piece of data in the lines underneath with the right heading.
Thanks
-
Mar 10th, 2011, 10:50 AM
#2
Re: Outputting to Excel File
what are you trying to output?
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Mar 10th, 2011, 10:58 AM
#3
Thread Starter
New Member
Re: Outputting to Excel File
I'm trying to output the remains of a string after i've sliced it up.
Example piece would be
Club GP Wins Draws Loss GS GA GD Points
Stevenage 34 23 10 1 45 32 13 79
It outputs that sort of thing however it does it all within column A and then Row 1,2 etc.
-
Mar 10th, 2011, 11:43 AM
#4
Re: Outputting to Excel File
format the string. seperate columns with vbtab + rows with environment.newline.
copy to clipboard, select the correct number of cells (columns + rows) in excel as a range, then call range.paste.
- Coding Examples:
- Features:
- Online Games:
- Compiled Games:
-
Mar 10th, 2011, 11:43 AM
#5
Re: Outputting to Excel File
I have a thread in the .NET CodeBank that exports datatables and datareaders to Excel. While you are not doing either of those things, it would have the code in it to save data to different cells, which would be pretty much what you are looking for. That class loops through the fields in a datarow and saves each one to a subsequent column.
My usual boring signature: Nothing
 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|