Open xlsx with vim [closed] - vim

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 2 years ago.
Improve this question
I'm frequently getting .xslx files and do not have the newest Excel to open. Open Office takes too long to open them as does converting software for older Excel versions.
So, I want to open the xlsx file using vim (or maybe notepad++). However, apparently it is not stored as standard text, so trying to open it results in random characters.
Is there some way I can get vim or Notepad++ (or some other text editor) to open an XLSX file?

XLSX is just a zip of a bunch of XML files, so you could unzip them and view the XML, but that isn't going to get you very far, because the XML itself is not all that easy to read. My experience with it isn't extensive, but basically, in worksheets with formulas and numbers, you'll see an XML file for each sheet, containing an element for each cell with information about the cell and what it contains (<f> tags for functions, v for value), except if the cell contains a string, the value is a number referencing it to sharedStrings.xml, which contains basically a list of all unique strings in the entire workbook. I don't see an easy way to just open it up and read the contents the way you seem to want to.
It's possible that converting the xlsx file to something simple like CSV may be faster than trying to convert it to xls, which is a different binary format, but I don't know. Another option is rolling your own conversion program using something like Perl's Spreadsheet::XLSX. I don't know how much this will help you, but hopefully you can get enough information from this to know where to look next.

If you don't like Libre Office, you can use MS Office online and export it to .csv comma-separated which you can edit more easily with vim.

Related

Stop Excel Scientific Notation Conversion [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 3 years ago.
Improve this question
Is there a way to STOP EXCEL from converting data into Scientific Notation?
Microsoft Excel apparently assumes that any data that contains numbers and an E is supposed to be scientific notation and converts it.
17195E000039 automatically changes to 1.7195E+43
17221E000112 automatically changes to 1.7221E+116
Is there a way to prevent Excel from doing this so it doesn't continue to cause problems for all of us users who never want to use SCIENTIFIC NOTATION ever? I cannot foresee any time where I will EVER want to have anything converted to scientific notation. This useless functionality only causes problems.
How do I stop Excel from trying to convert text into scientific without manually performing some operation first?
Unfortunately, the data comes from another system that exports to excel that I cannot change. I cannot manually change the page beforehand and going through afterwards sucks.
Issue also occurs with simple strings (eg "1E6" from microtitre plates). I don't think it's a simple as pnuts or Scott's responses.
See similar Q I just posted with more detail, toy reprex example, and trial solutions that have failed. How to stop csv files converting characters (eg plate well IDs 2E6) to scientific notation?
Is there a way to STOP EXCEL from converting data into Scientific Notation?
As explained by #Scott Craner: For you, No.
This is something that happens automatically when the data is written - by the time you see it it is too late.

Recovery other sheets in .CSV format [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 10 months ago.
Improve this question
I worked on .csv format file and I made some different sheets. I Saved my .CSV file and close my file.
Right now when I open my file, I just can see one sheet. All of my sheets is disappeared.
Is there any way to recovery other sheets?
No, CSV files do not support sheets. Excel will only save the active worksheet when saved to .csv format. This has to do with how csv files are merely "flat files" where .xls/.xlsx formats are not.
Like some of the comments have mentioned - it may exist in some temporary file, but your work is most likely lost.
If your file is in Drop Box or any other similar cloud based, you might be able to get the other tabs that you had worked on.
I did the same mistake while compiling my tax returns, had the transactions in the main tab and created the next tag for Out of Pocket expenses and didn't realise it was a csv until I finished and saved and closed
Though there were many versions of the CSV in the drop box, as my second tab was significantly smaller, I was able to find the version with a much much smaller size.
I hope the user should not be allowed to create a second tab for a CSV file or at least have a warning.
This thing is an a nightmare! Now knowing I started off with a CSV file on a Dropbox directory, I kept adding many worksheets to that file. So I worked on that file for 15 days on the evenings, I usually leave the file open, only let my laptop hibernate. One day I wanted to work on the file day time at my office, so I saved and closed the file the evening before. When I arrived and opened it at my office, I was shocked to discover only one worksheet, he one I least wanted to retain was available on the file. A little bit of research on how to recover files from Dropbox, I found a way to recover almost all of the missing worksheet. Here are the procedures.
Step 1. Open the dropbox director => hover over the file=> right click => then click on "view history". The entire history of that file appears, with dates and time. Recovering the missing worksheets a trial and error procedure.
Step 2. Hover over a file in the history list (e.g. starting from the earliest and progressing to the latest version version), and you will see "restore" to the right hand side corner. Click restore. Now go to the Dropbox directory and open the restored file, check its content, and move it to a separate and permanent excel file.
Step 3. Repeat the procedure for most versions until you recover all missing worksheets.

Applying filters to headers in huge csv file [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
I am working with the csv file with size approx 500MB. https://s3.amazonaws.com/GooglePlayStore/GooglePlayStats.zip
Opening the above csv file in excel causes wrong data to be displayed under wrong column headers (may be due to large size of csv). Opening with EM editor doesn't allow me to align the columns data and to remove entire columns from the csv file.
what is my best way to use this csv in a user friendly way (aligning the data in columns and deleting columns of no interest)
Best option is to use an editor that's been designed for "large csv's". They tend to load the CSV data on demand from the source file, rather than reading it all into memory and processing it. Plus a CSV editor will have less processing overhead compared to Excel as they are 10000000x dumber.
Quick google for "large csv editor" should get you going. Such as http://csved.sjfrancke.nl/ (randomly selected, not endorsed)

Get code from protected excel doc [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 8 years ago.
Improve this question
Is it possible to get function or script code from a protected excel document?
If so, how do I go about doing this?
The file is .xls and was likely created in office 2003
for 2007 you can always buy third party software to unlock the VBA Project.
Or, you can do it yourself. I only know the very messy way - rename your file from .xlsm to .zip, and accept windows telling you this may cause bother. Then, go into your new zip, and you will find your .bin file (default name is vbaProject.bin unless the original author changed it). Copy it, and paste it somewhere else to keep the original document intact. Then, open up the bin file in notepad ++ and patiently scour your way through until you find your code. Even if the project is password protected, it will all be in here, but may require a little patience.
It depends on what version excel document it is. The older excel documents (2003) can easily be accessed even if they are encrypted, but encrypted 2007 excel documents are much more difficult to open if you have forgotten the password.

Exporting an Excel plot as SVG or PNG [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 1 year ago.
Improve this question
After I have created a plot in Excel , is there a way to export the plot to SVG while retaining the explicit characters and vector strokes. (I do not want to have to capture the screen and export).
UPDATE: I do not want to export in some complex and potentially lossy format such as PDF or Word. The graphics strokes are there in PDF, I just want to get them out. Also I don't want to dump as CSV and replot using some other tool.
I think you have set yourself a very difficult task.
If you copy a plot area to the clipboard and look at the formats available with Application.ClipboardFormats, the only vector format offered is PICT. Perhaps this could be an avenue to investigate...
If you 'Print to PDF' you should be able to convert it to SVG-format. There's several converters online, I would use Adobe Illustrator though.
Copy it as a plot into powerpoint. Save in powerpoint as a emf. Open the emf in e.g. inkscape, then save as svg. Vectors are preserved.
2020 Update
This is now easily possible manually
Just right-click the chart and select "Save as Graphic" where you have the option to save as .svg.
Solution for VBA
Unfortunately, this relatively new feature is not yet supported by the object model. Chart.Export fileName:="MyChart", FilterName:="SVG" will result in an empty file as of now. Therefore, exporting with VBA is still very difficult and only possible by automating the "manual" method. I created a solution that is doing exactly that and tried to make it easy to implement in other code. For the full solution, check out this answer.
Save to PDF and operate it with InkScape which is totally free and sharing similar function to Illustrator.
Solution is simple, just copy and paste the plot to Inkscape. It keeps original size and all shapes are vectorized.

Resources