Excel And Text Files

Please post here for questions and discussion about scenario, art and sound modding and the game editor for Distant Worlds.

Moderators: elliotg, Icemania

Post Reply
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

Excel And Text Files

Post by Darkspire »

Does anyone know the correct order of selections to get a text file to be read properly in Excel 2007?
First off I have no problems with getting it in using open and selecting the file, its what options to select on the import wizard so that the data is displayed correctly, columns displayed correctly under one another, names of items being correctly spaced etc.

This is an example of what I have tried, I have tried all the combinations I can come up with and still not getting what I want.

1.Delimited
2.Delimiters:
Tab
Comma
Space
3.Column data format
General

Thanks

Darkspire
dostillevi
Posts: 322
Joined: Fri Aug 31, 2012 11:31 am

RE: Excel And Text Files

Post by dostillevi »

Can you point me towards the file you're working on? I find I get good results using delimiters tab comma and space, with the box checked to treat consecutive delimiters as one. The preview window gives a pretty accurate example of how the data will be arranged. I just tested this with the biases file and it imported the values correctly.
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Excel And Text Files

Post by Darkspire »

That works for single names, if the names have spaces in the columns get messed up and is as useful as a text editor view of the file. I am none to bothered about the names as long as they are all in one column, I can resize that, its the data that is not aligned that is giving me the headache, I know it can be done but I have not worked with excel since the 97 release when I used it for Diablo II.

Unfortunately I can not comment on file types as I am currently in the field on a top secret mission for the NDA [;)]

Thanks though, I have another permutation to add to the mix, the tickbox for treat as one, tried that a few times but gave it up with the results I was getting, just never tried it with the biases file, so I know it works at least and I am heading in the right direction.

Edit:

It works [:)] Just use tab and comma not space, with treat as one checked, bingo [:'(]
Now all I need to do is work how to save it, CSV screws it up as does TXT (delimited) [8|]

Darkspire
User avatar
Cardassian_Union
Posts: 14
Joined: Mon Aug 26, 2013 4:12 pm

RE: Excel And Text Files

Post by Cardassian_Union »

It works Just use tab and comma not space, with treat as one checked, bingo
I am using, just comma without tab. It works fine. Ok, i am using LibreOffice not Office-Excel ... ;)
Now all I need to do is work how to save it, CSV screws it up as does TXT (delimited)
So whats the result? How does it look like?

The Cardassian_Union
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Excel And Text Files

Post by Darkspire »

ORIGINAL: Cardassian_Union
It works Just use tab and comma not space, with treat as one checked, bingo
I am using, just comma without tab. It works fine. Ok, i am using LibreOffice not Office-Excel ... ;)
Now all I need to do is work how to save it, CSV screws it up as does TXT (delimited)
So whats the result? How does it look like?

The Cardassian_Union

One ends up incorrectly spaced without commas or incorrectly spaced with commas everywhere, so I just saved them in the default format so that they are easier to view [8|]

Darkspire
User avatar
Cardassian_Union
Posts: 14
Joined: Mon Aug 26, 2013 4:12 pm

RE: Excel And Text Files

Post by Cardassian_Union »

You have one line without commas and one with in the same file?
Whats your Textexport-settings / filter-settings in the Save As Dialog?


Sorry, i don't get it without seeing the file. :/ You can mail your file, if you like? So i am able to reconstruct the problem... or not! ;P

The Cardassion_Union
User avatar
BigWolfChris
Posts: 661
Joined: Wed Mar 31, 2010 4:26 pm
Contact:

RE: Excel And Text Files

Post by BigWolfChris »

Darkspire, did you get this sorted how you wanted in the end?
AMD Ryzen 7 2700X 8 Core @3.7GHz
2x16 GB Vengeance LPX 2666MHz RAM
MSI RTX 2070 Armor 8G
SSD Drive
User avatar
Darkspire
Posts: 1986
Joined: Thu Jun 12, 2003 8:07 pm
Location: My Own Private Hell

RE: Excel And Text Files

Post by Darkspire »

ORIGINAL: BigWolf

Darkspire, did you get this sorted how you wanted in the end?

Kind of, I am learning Excel as I am using it, I can get the data in and able to format it, add formulas etc for display and easy reading of data but getting a basic file out to text files that have all the right format I still have no idea (for example the biases.txt), CSV or text I still end up with problems on the output file.
Have not commented on here due to the NDA, been cut and pasting from Excel to Textpad or just writing from scratch. All I need to know is the correct output settings.

Darkspire
User avatar
BigWolfChris
Posts: 661
Joined: Wed Mar 31, 2010 4:26 pm
Contact:

RE: Excel And Text Files

Post by BigWolfChris »

Unfortunately, due to the nature of said files, excel and openoffice calc is an f'ing pain the in the behind
Don't know about excel (don't use it), but there is sort of a way in calc to do it
Basically the simplest method is using string concatenation
You'll need to set up 2 (IIRC) concatenation methods

Can't really go into to much detail here yet obviously, but if you want, post to my thread in the 'NDA area' (lol) and we can chat in more detail there
AMD Ryzen 7 2700X 8 Core @3.7GHz
2x16 GB Vengeance LPX 2666MHz RAM
MSI RTX 2070 Armor 8G
SSD Drive
User avatar
Shark7
Posts: 7937
Joined: Tue Jul 24, 2007 4:11 pm
Location: The Big Nowhere

RE: Excel And Text Files

Post by Shark7 »

I can get them to read ok, but have trouble getting them to save correctly.
Distant Worlds Fan

'When in doubt...attack!'
Post Reply

Return to “Design and Modding”