Page 1 of 1
Techie Question How to Export SQL Server Query into an Excel Document
#1
Posted 14 May 2009 - 10:29 PM
Illigitimae Noncarborundum.
#2
Posted 14 May 2009 - 10:34 PM
I'd guess you need to figure out how to make excel limit the number of columns per sheet.
I'm not sure how to do that.
P.S. What the hell are you doing?
I'm not sure how to do that.
P.S. What the hell are you doing?
high intellectual
#3
Posted 14 May 2009 - 10:36 PM
Elite, on May 15 2009, 01:34 AM, said:
I'd guess you need to figure out how to make excel limit the number of columns per sheet.
I'm not sure how to do that.
I'm not sure how to do that.
Right. Me neither dude. I guess that it is just going to be a hell of a long day at the office tomorrow. Thanks for the response though.
Illigitimae Noncarborundum.
#5
Posted 14 May 2009 - 10:53 PM
Elite, on May 15 2009, 01:40 AM, said:
What are you doing again, btw?
I work at a place that writes training programs for a multitude of different things. I am supposed to seperate each course into its own sheet, then put the lesson names and the questions that go with them into the corresponding sheet. Right now the only method that works to do this is to copy and past all the lessons and questions into each individual sheet. It is going to be a very tedious process.
Illigitimae Noncarborundum.
#6
Posted 14 May 2009 - 11:41 PM
No way to dump it into a comma seperated value?
LOOK! IT'S DIFFERENT! KILL IT!!!
#7
Posted 16 May 2009 - 07:57 AM
What are you transferring the query from? It sounds to me like it's coming out as a flat file and you need to parse it. Excel 2003 has a "text --> columns" feature under the "data" menu, I believe.
You're not going to get 780,000+ columns into a single excel sheet, I guarantee that. You have at most 676 (A-ZZ) columns, and 65536 rows, which would result in over 1000 excel sheets.
I would do the following:
1) Break up your query (if possible) into reasonably-sized chunks, such that you are well within the reasonable limits of excel
2) Ensure the FORMAT of each broken-down query is consistent, i.e. every column is "X"-characters long.
3) I would recommend using the "record macro" feature, and use the "text-->columns" feature, such that you can break each sheet down into something legible at the press of a button.
It will still take all day, but you could be done by tomorrow, rather than a month from now.
You're not going to get 780,000+ columns into a single excel sheet, I guarantee that. You have at most 676 (A-ZZ) columns, and 65536 rows, which would result in over 1000 excel sheets.
I would do the following:
1) Break up your query (if possible) into reasonably-sized chunks, such that you are well within the reasonable limits of excel
2) Ensure the FORMAT of each broken-down query is consistent, i.e. every column is "X"-characters long.
3) I would recommend using the "record macro" feature, and use the "text-->columns" feature, such that you can break each sheet down into something legible at the press of a button.
It will still take all day, but you could be done by tomorrow, rather than a month from now.
#8
Posted 30 May 2009 - 12:56 PM
you could make it a .csv and write some perl to turn it into a .xls, or just manually open the .csv and save it as a .xls
Share this topic:
Page 1 of 1

Help







