Hi,
I am using a circuit simulation program called LTSPICE. It has an option to export chart data to a text file. Unfortunately, the format is not directly compatible with Excel. A snippet of the file output is shown below:
Freq. V(out)
1.00000000000000e-002 (-1.07460150501695e+000dB,1.70221075386850e+002°)
1.02329299228075e-002 (-6.74640008303624e-001dB,1.69991552342250e+002°)
1.04712854805090e-002 (-2.74683403826346e-001dB,1.69756559710614e+002°)
1.07151930523761e-002 (1.25267781027906e-001dB,1.69515961436982e+002°)
1.09647819614318e-002 (5.25212965403845e-001dB,1.69269617699112e+002°)
1.12201845430196e-002 (9.25151509702781e-001dB,1.69017384779520e+002°)
1.14815362149688e-002 (1.32508270979400e+000dB,1.68759114931987e+002°)
1.17489755493953e-002 (1.72500579066355e+000dB,1.68494656242269e+002°)
1.20226443461741e-002 (2.12491989944593e+000dB,1.68223852482718e+002°)
1.23026877081238e-002 (2.52482409777929e+000dB,1.67946542960527e+002°)
1.25892541179417e-002 (2.92471735341947e+000dB,1.67662562359300e+002°)
1.28824955169313e-002 (3.32459853104108e+000dB,1.67371740573617e+002°)
1.31825673855641e-002 (3.72446638214826e+000dB,1.67073902536292e+002°)
1.34896288259165e-002 (4.12431953400941e+000dB,1.66768868037971e+002°)
I would like to have 3 columns of data: Freq., Amplitude, and Phase. The Amplitude needs the dB removed and the Phase needs the ° removed. The parentheses also need to be removed. Also, having the data delimited by commas would be best. It would also be nice to have the data limited to 3 decimal points. The files are of variable length in rows.
Could anyone in the Forum help with a VBA macro that could do this processing?
Any help would be greatly appreciated.
Thanks,
Art
I am using a circuit simulation program called LTSPICE. It has an option to export chart data to a text file. Unfortunately, the format is not directly compatible with Excel. A snippet of the file output is shown below:
Freq. V(out)
1.00000000000000e-002 (-1.07460150501695e+000dB,1.70221075386850e+002°)
1.02329299228075e-002 (-6.74640008303624e-001dB,1.69991552342250e+002°)
1.04712854805090e-002 (-2.74683403826346e-001dB,1.69756559710614e+002°)
1.07151930523761e-002 (1.25267781027906e-001dB,1.69515961436982e+002°)
1.09647819614318e-002 (5.25212965403845e-001dB,1.69269617699112e+002°)
1.12201845430196e-002 (9.25151509702781e-001dB,1.69017384779520e+002°)
1.14815362149688e-002 (1.32508270979400e+000dB,1.68759114931987e+002°)
1.17489755493953e-002 (1.72500579066355e+000dB,1.68494656242269e+002°)
1.20226443461741e-002 (2.12491989944593e+000dB,1.68223852482718e+002°)
1.23026877081238e-002 (2.52482409777929e+000dB,1.67946542960527e+002°)
1.25892541179417e-002 (2.92471735341947e+000dB,1.67662562359300e+002°)
1.28824955169313e-002 (3.32459853104108e+000dB,1.67371740573617e+002°)
1.31825673855641e-002 (3.72446638214826e+000dB,1.67073902536292e+002°)
1.34896288259165e-002 (4.12431953400941e+000dB,1.66768868037971e+002°)
I would like to have 3 columns of data: Freq., Amplitude, and Phase. The Amplitude needs the dB removed and the Phase needs the ° removed. The parentheses also need to be removed. Also, having the data delimited by commas would be best. It would also be nice to have the data limited to 3 decimal points. The files are of variable length in rows.
Could anyone in the Forum help with a VBA macro that could do this processing?
Any help would be greatly appreciated.
Thanks,
Art