Accelerated Evolution: Techie Question - Accelerated Evolution

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Techie Question How to Export SQL Server Query into an Excel Document

#1 User is offline   Refined Mind 

  • Techie Guru
  • PipPipPip
  • Group: Members
  • Posts: 229
  • Joined: 14-May 09
  • Location:Grand Rapids, Michigan

  Posted 14 May 2009 - 10:29 PM

:unsure: Alright. Here it goes. I've know how to do a basic transfer of a query into Excel, but my problem is that I need to figure out how to make it so that it doesn't dump the whole query onto one sheet. This has 780000+ columns and it needs to be spread over thousands of sheets in the Excel Document. If there is someone out there who could help me with this it would be greatly appreciated. Either that or tomorrow I continue my copying and pasting. The whole process should take all day plus =(.
Illigitimae Noncarborundum.

#2 User is offline   Elite 

  • Cool
  • Group: Administrators
  • Posts: 803
  • Joined: 23-November 05

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?
high intellectual

#3 User is offline   Refined Mind 

  • Techie Guru
  • PipPipPip
  • Group: Members
  • Posts: 229
  • Joined: 14-May 09
  • Location:Grand Rapids, Michigan

Posted 14 May 2009 - 10:36 PM

View PostElite, 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.


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. :headbang:
Illigitimae Noncarborundum.

#4 User is offline   Elite 

  • Cool
  • Group: Administrators
  • Posts: 803
  • Joined: 23-November 05

Posted 14 May 2009 - 10:40 PM

What are you doing again, btw?
high intellectual

#5 User is offline   Refined Mind 

  • Techie Guru
  • PipPipPip
  • Group: Members
  • Posts: 229
  • Joined: 14-May 09
  • Location:Grand Rapids, Michigan

Posted 14 May 2009 - 10:53 PM

View PostElite, 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 User is offline   LeadingMan 

  • Just waiting around.
  • Group: Moderators
  • Posts: 2,922
  • Joined: 15-March 06
  • Location:Cal-ih-4-Nigh-Aye

Posted 14 May 2009 - 11:41 PM

No way to dump it into a comma seperated value?
LOOK! IT'S DIFFERENT! KILL IT!!!

#7 User is offline   Ikari Warrior 

  • JAWESOME!
  • PipPipPipPipPip
  • Group: Members
  • Posts: 1,001
  • Joined: 08-April 06

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.

View PostCeraziefish, on Jan 29 2009, 03:17 PM, said:

Oh my god. She clearly has the Dumb on a level that our scouters can't measure.

#8 User is offline   Binary Baltar 

  • BOOM!
  • Group: Donators
  • Posts: 957
  • Joined: 13-December 05
  • Location:Vault 13

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
Posted Image

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users