PDA

View Full Version : Excel. Need help.



radamanthys
07-18-2010, 09:19 PM
Hokay, so.

I have a rather big dataset (40k rows, 123 columns). The recipient needs it in fixed width format (why god why). The data, at fixed width, is 1700 characters wide (I have the file layout). Excel, in its infinite glory, will only output to .prn as fixed width at a maximum width of 255 characters before it starts 'stacking the data'. I ended up with a 250k line long, 255 character wide (useless as fuck) file before I realized that it was doing it.

Could anyone give me a better way to do this? Geek team, ASSEMBLE!



plz?

Bobmuhthol
07-18-2010, 09:25 PM
I don't know if this will help but I keep seeing a lot of "nah bro that ain't possible because it's hard coded that you can't exceed 240 characters."

http://support.microsoft.com/kb/249885

I also typed ".porn" like the Freudian slipping motherfucker that I am.

radamanthys
07-18-2010, 09:27 PM
I don't know if this will help but I keep seeing a lot of "nah bro that ain't possible because it's hard coded that you can't exceed 240 characters."

http://support.microsoft.com/kb/249885

I also typed ".porn" like the Freudian slipping motherfucker that I am.


Yea, I tried googling. I googled like crazy. I googled till I was friggen raw. It didn't amount to much. You know how it is.

It looks like I'd have to write a macro to export directly to text. I haven't written VBA in 10 years. :-/

This one is kicking my ass.

Bobmuhthol
07-18-2010, 09:30 PM
Wait, it seems like you're running into two problems: .prn doesn't allow more than 240 characters and Excel doesn't allow more than 255 with fixed width fonts. Good luck!

radamanthys
07-18-2010, 09:41 PM
Thanks, Bob.

I'll see if I can dig my old vba book out of the garage.

Cephalopod
07-18-2010, 09:59 PM
If I could give you one piece of advice, it would be that Excel is not the proper tool for this.

radamanthys
07-18-2010, 10:16 PM
If I could give you one piece of advice, it would be that Excel is not the proper tool for this.

Happen to know of anything better?
:)

Clove
07-18-2010, 10:24 PM
A database?

Bobmuhthol
07-18-2010, 10:29 PM
Excel handles databases just fine.

Cephalopod
07-18-2010, 10:30 PM
Yeah, a real database.

Alternately, you could do this solely using Perl (or any language like it) and flat-files.

For speed, I'd load the data into a MySQL DB, then write a small script to output as needed; but, I have MySQL DBs lying around, so this may not be a good solution for you.

radamanthys
07-19-2010, 04:19 PM
Yeah, a real database.

Alternately, you could do this solely using Perl (or any language like it) and flat-files.

For speed, I'd load the data into a MySQL DB, then write a small script to output as needed; but, I have MySQL DBs lying around, so this may not be a good solution for you.

I was just gonna write a macro to output it directly. Though I had hoped someone had run into this problem before. But I told my client to submit formatted csv and xls files and let the other company deal with their own semi-archaic, pain in the ass format.

Thanks for the help y'all!