Date: prev next · Thread: first prev next last
2020 Archives by date, by thread · List index

=Wanted to see if it could be done outside libreoffice calc, since it doesn't 
want to work.

Since I don't have the original user info, I created a file with 1000 
randomly created data elements.

Created a bash script using sed to do the same processing.
Shell script

sed -e 's/^/=(/;s/\/+/;s/\x27/\/60+/;s/\x22/\/3600/;s/O\|S/\)*(-1)/;s/N\|E/)/'gps.txtgps.csv
sed -e 's/^/(/;s/\/+/;s/\x27/\/60+/;s/\x22/\/3600/;s/O\|S/\)*(-1)/;s/N\|E/)/'gps.txtgps.raw
paste -d, gps.txt gps.csvgpsboth.csv</div>bc -lgps.rawgps2.txt
paste -d, gps.txt gps2.txtgpsbc.csv#libreoffice --infilter=CSV:44,34,76,1 gps.csv gpsboth.csv 

To process the 1000 records time ./ reports.


So, less than 4 hundredth of a secondFirst sed line creates a file that just has the decimal 
version for matching line
Second sed line makes a version of the output for use as input to bc, since it doesn't like the 
= that is needed to import into libreoffice.
paste command just makes a combined version of input data, and result in columns A and B
bc -l takes the formula file, and actual calculates the final number, so no need for libreoffice to 
calculate it.
paste again combines the two files.
For time test the loading to libreoffice is commented out.

Did find an error in my earlier process thou..
In other macros, date is converted to time value so the multiply by -1 for values didn't need ( ).
The above adds that..

Well, a simple solution that works, and libreoffice can read the csv files without issue..
Also, a lot faster...

Again. Have a nice day.

To unsubscribe e-mail to:
Posting guidelines + more:
List archive:
Privacy Policy:


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.