Importing LTSpice data.txt into OpenOffice spreadsheet - Page 1
Forum section: electronics / beginners

author: MathWizard
author_rank: Super Contributor
timestamp: June 29, 2024, 09:10:59 pm
content: So far I learned to import a "sheet from a file", and I've managed to get the 4 columns of data in the .txt to become 4 columns in the SS, but all the numbers have a ' before them.For the separator options I've triedseparated by = tabseparated by other = 'Text delimiter = 'And all the numbers display fine on screen in their box, but when you click on them, they all have a ' before them, and when you try and do calculations with them, you get an error. I've tried just copy/pasting their values as just numbers, and it still won't do calculations with those new entries.Anyone familiar with this ??

author: Le_Bassiste
author_rank: Frequent Contributor
timestamp: June 30, 2024, 08:37:17 am
content: have you checked the decimal separator setting in your OS / spreadsheet program? if it's set to "," then numbers containing a "." will be converted to text during data import. if you don't want to change that setting (you probably won't), you can search and replace the decimal separator in the *.txt file of the sim-data and then import the data into the spreadsheet.hth

author: RoGeorge
author_rank: Super Contributor
timestamp: June 30, 2024, 06:40:15 pm
content: An apostrophe at the beginning of a spreadsheet cells means the cell contains text (so not a number). Either import the columns as numbers (not as standard), or let them as they are by default, but produce another 4 columns in your spreadsheet (as formula), where you convert the iported text columns into number columns.for example, if you have e.g. in cell B3 a text'1234.5, you type in cell F3 the formula=VALUE(B3), then drag the formula down for the entire column, and right for all 4 columns.Now, the columns F, G, H and I should should contain numbers from the columns B, C, D and E.The cells from columns F, G, H and I are now numbers, and their cells can be used in math formulas.

author: MathWizard
author_rank: Super Contributor
timestamp: July 01, 2024, 01:48:47 am
content: Ok thanks RoGeorge that worked, just using the =VALUE(cell), and I can now do math. In the text file, the only thing between actual numbers, is blank space, that highlights as one entire block. But they aren't all the same size, but I guess they are just tab's.As far as I've ever seen in windows, LTSpice and OpenOffice, the decimal separator is a period.

author: RoGeorge
author_rank: Super Contributor
timestamp: July 01, 2024, 05:43:44 am
content: If you do data post-processing for LTspice files, you may either export CSV then import in a spreadsheet, or if you need more automation, there are Python modules that can read directly from LTspice raw files, without the need of exporting CSV.It is also possible to run LTspice from Python, such that you can alter various parameters of a schematic in Python, then start the simulation again and again, and retrieve the results also from Python. Good for long simulations and heavy data post-procesing in Python (let it run over night and find the Python results ready next day).You may want to know that, by default, LTspice uses lossy compression to save the produced waveforms, so the plots you see in LTspice is interpolated data after decompressing, so not 100% accurate with the simulation.This usually doesn't matter for just looking at the plots and waveforms, but if you do more advanced processing (for example a FFT), then the artifacts caused by compression/decompression may become visible. Data compression of the LTspice results can be disabled, either from the LTspice settings, or even better, by adding the needed LTspice directives to your schematic.