10-30-2018 01:17 PM
Hello!
I am writing a program that takes several text data file inputs and has to turn them into a particular format to be accepted as inputs by another (previously written) exe.
The issue that I am having is that exponential numbers were recorded using the scientific notation instead of in decimal form. I want to use the "Replace Array Subset" function, but now I'm not sure how to go about making sure that it grabs the exponents of each value with an exponent and turns it into the decimal value instead of scientific notation. Currently, my program goes through each row and searches for the value E, and I want it to replace that value with the decimal form. The decimal isn't the same very each value, so it's not like I can hardwire a set decimal input to the replace array subset.
Is there a way to do this?
10-30-2018 01:30 PM
I do not understand your issue here.
If the mantissa and exponent are in the same cell then you get both or neither.
10-30-2018 01:35 PM
@notAWizard0555 wrote:
Is there a way to do this?
Yes
But it would help if you could attach a copy of your text spreadsheet.
10-30-2018 01:36 PM
is this fine to solve your problem?
I'm not sure to understand why you're struggling.
10-30-2018 03:17 PM - edited 10-30-2018 03:18 PM
I hate to say this without seeing your data file but...
Excel can import just about any file. Launch Excel then go to the "Open" menu and select your file.
If your file is not an XLS or XLSX Excel will automatically launch the "file importer" and ask you a few questions about your file structure, (delimiter, fixed width, etc) and then Excel will import the data into a spreadsheet.
Now you can select the entire row of data, right click and select "Format Cells" and you can change the number format to anything you want.
Oh I just have to ask why the first EXE does not output the data file in the format you need for the second EXE? Makes more sense to fix the first program than to write a third program.
10-30-2018 05:24 PM - edited 10-30-2018 05:25 PM
@notAWizard0555 wrote:
Hello!
I am writing a program that takes several text data file inputs and has to turn them into a particular format to be accepted as inputs by another (previously written) exe.
The issue that I am having is that exponential numbers were recorded using the scientific notation instead of in decimal form. I want to use the "Replace Array Subset" function, but now I'm not sure how to go about making sure that it grabs the exponents of each value with an exponent and turns it into the decimal value instead of scientific notation. Currently, my program goes through each row and searches for the value E, and I want it to replace that value with the decimal form. The decimal isn't the same very each value, so it's not like I can hardwire a set decimal input to the replace array subset.
Is there a way to do this?
Steps to get help: