CSV Data Manipulation
CSV Data Manipulation
(OP)
Could someone suggest how I can manipulate a cell in a csv file which contains 4 sets of values from a GCDC X16-4 accelerometer Time,Ax,Ay,Az and divide only the Ax,Ay,Az values by 2048 and then keep the output format the same with the Time,Ax,Ay,Az within the one cell.
RE: CSV Data Manipulation
Dan - Owner
http://www.Hi-TecDesigns.com
RE: CSV Data Manipulation
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm
RE: CSV Data Manipulation
.csv TEXT files do NOT have cells.
I fail to understand.
If, however, you are using Excel to open a .csv TEXT file, which is really a bad idea (just because you CAN hit your thumb with a hammer, does not mean that you SHOULD) I'd suggest posting your question at Eng-Tips sister site, http://www.tek-tips.com/threadminder.cfm?pid=68, where Excel questions like this can be addressed.
Skip,
Just traded in my OLD subtlety...
for a NUance!
RE: CSV Data Manipulation
When read by Excel, they map directly into Excel's cell structure, so the 4th CSV values on each line will wind up in column D.
What I would do is
> read the file into Excel
> type 2048 somewhere away from the 4 columns
> do a Copy of the 2048 cell
> Paste Special/Divide columns B,C, and D
> delete the 2048 value
> save as a CSV
If necessary, these operations can codified in a macro
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm
RE: CSV Data Manipulation
RE: CSV Data Manipulation
A text file has no cells. And as I stated, if the OP were opening the text file with Excel, it is a very bad idea to do so. Excel can and will change data unless you protect your data be taking charge of the conversion. That is why one should IMPORT data into an existing workbook/worksheet, using the parsing and converstion features in the Import dialog.
Unintended converstions that could happen if a text file is opened with Excel:
However, by using the Data > Get External Data > From Text... using a delimited import with COMMA as delimiter and specifying the appropriate Column Data Format, these conversions can be avoided.
Skip,
Just traded in my OLD subtlety...
for a NUance!
RE: CSV Data Manipulation
TTFN (ta ta for now)
I can do absolutely anything. I'm an expert! https://www.youtube.com/watch?v=BKorP55Aqvg
FAQ731-376: Eng-Tips.com Forum Policies forum1529: Translation Assistance for Engineers Entire Forum list http://www.eng-tips.com/forumlist.cfm
RE: CSV Data Manipulation
Just because you can does not mean that you should.
I rarely open a text file with Excel for this very reason. I IMPORT. Since most of my work was in a production environment, IMPORT, once established, can simply be refreshed to import fresh data, retaining all the data conversion protection previously applied.
Skip,
Just traded in my OLD subtlety...
for a NUance!
RE: CSV Data Manipulation