PDA

View Full Version : Solved: Save Excel to .prn producing interesting result



Movian
05-27-2009, 10:20 AM
Hey,
another (hopefully quick) question.

I have an excel spreadsheet that i need to save to a .prn file format.

I have the automation in place and it seems to work fine. However i am running into a problem.

i have two cells (that are not even next to each other "R49" and "U49").

the first stores a currency value (as text) eg 180.00 the field U49 stores a number (most often just 1)

however when i save as the .prn it for some reason decides to MERGE the 2 fields!!! giving me the result


~Edit
After posting this i realized it should probably have gone into the excel section. Sorry I'm just so used to posting in here i didn't think about it. If a mod could move the topic that would be great as i don't appear to be able to delete or move it myself

180.01

Now this is a BIG problem as a it now has a different price and B looks as if the other number doesn't exist!!!

any ideas on how i can prevent this from happening?

Movian
05-28-2009, 06:14 AM
Well turns out that .prn files base their spacing of the width of the cells.

Dosn't matter if you have cells merged, or formatting on the cells.

If your cell is a certain width, it will only show X number of characters and if the text in cell 1 takes up all the available characters in that cell it will have no spaces between that cells text and the next cells text.....

further more, if you have more text in a cell than the prn decides the width of that cell should allow. it just cuts it off and again shows NO SPACES BETWEEN THAT CELL AND THE NEXT!

HOW STUPID IS THAT!!!!?

so any way long story short. I increased the width of the cell and it fixed it.

CreganTur
05-28-2009, 06:27 AM
HOW STUPID IS THAT!!!!?

Yet another reason why I stay away from fixed width files :p