Why does opening a CSV file in Excel break my Highcharts chart? - excel

I'm working on using CSV files to create Highcharts – but running into an odd problem: when Excel 'touches' a CSV file, the chart breaks immediately. Here's the simplest example:
Highcharts online documentation has a handy example of a bar chart generated from a CSV file: http://www.highcharts.com/studies/data-from-csv.htm
The data underlying this chart can be downloaded from: http://www.highcharts.com/studies/data.csv
But here's the odd thing. If I download those files, and recreate the chart on my own web server, everything works fine... until I open the data.csv file in Excel, then save it. This breaks the Highchart immediately, even if no changes are made to the underlying data. No error messages are thrown up in the console – the chart simply goes blank as soon as Excel makes a save.
I know what you're thinking – "this moron is saving a CSV file as a .xslx, then wondering why his chart breaks." But that's not what's happening – using the 'Save As... .csv' option in Excel also breaks the chart immediately.
Here's the content of the CSV file before I open it in Excel (cut and pasted from TextEdit):
Categories,Apples,Pears,Oranges,Bananas
John,8,4,6,5
Jane,3,4,2,3
Joe,86,76,79,77
Janet,3,16,13,15
And here's the content of the CSV file after opening it in Excel:
Categories,Apples,Pears,Oranges,Bananas
John,8,4,6,5
Jane,3,4,2,3
Joe,86,76,79,77
Janet,3,16,13,15
To my eyes, those are the same file! And yet the first one renders perfectly, the second (which has been saved by Excel) creates an invisible chart.
Any help greatly appreciated. I'm using Excel 2008 for Mac, if that's relevant. Thanks in advance...

Seems the solution was to save:
the CSV file as a 'Windows comma separated CSV'

Related

How to open second tab of excel file when linked from powerpoint file

I have an Excel 2013 document in .xlsx format having 3 separated tabs. When I open the excel file by double-clicking, I see the first tab opening by default, which is supposed.
I am linking the excel file on MS PowerPoint. However, here I want the second tab comes to the screen by default, but the first page comes.
In short, I want to see the first tab of the excel file when I open it by double-clicking, but want to see the second page when I open the excel file via the link in the PowerPoint. I couldn't find a way to manage it. Any help would be appreciated.
Thanks.

csv file not opening in standard view in OpenOffice

I am running a tool in Jenkins, which reads a .csv file. The computer I'm using doesn't have Microsoft Office installed, just OpenOffice.
Compared to Excel, OpenOffice opens this file in a strange view, for example:
connects a few columns to one column;
splits one line to many columns;
does not show columns titles.
I wonder if anyone has encountered this issue and can advise me.

Error importing pictures into an Excel file using ClosedXML

I have a problem with importing pictures in Excel. I usually use ClosedXML, but it cannot import pictures and first have to be saved in ClosedXML, and open in OpenXML, to insert a picture. As a result, when you open a file, I get an error.
"We found a problem with some content in 'error.xlsx'. Do you want us
to try recover much as we can? If you trust the source of this
workbook, click Yes."
If I save a picture in the Excel file already manually create everything works fine. The problem occurs when you save after ClosedXML.

Opening an Excel File in Notepad gives un related data

I am downloading an excel attachment from an email using a tool and converting that file to CSV Using VB Script. The problem I am facing is, after converting the file to CSV, when I try to open the file using notepad, it shows boxes instead of the correct data. But the same file if opened using an excel then it returns the correct data.
But if I create a mew CSV file and open it with notepad I am not facing this problem. kindly help me !!!
Without looking at your script, I would guess that the file is simply renamed to a .csv file - but not actually converted! This way, you would end up seeing the binary data in Notepad.
Try to open the original Excel file in Excel - and there save it as .csv. This will surely work, i.e. you'll see the data in Notepad.
If that does not help, please share your script.

Excel and Tab Delimited Files Question

I am encountering what I believe to be a strange issue with Excel (in this case, Excel 2007, but maybe also Excel 2003, but don't have access to it as I write this).
I can reliably convert some server data over into a tab-delimited format (been doing this for years) and then open it using Excel - no issue.
However, what seems to be happening is if I have an html <table> inside one of the fields, it looks like Excel 2007 thinks it should be converting the table into rows and columns inside Excel (not what I want). As you might imagine, this throws off the entire spreadsheet.
So question is, is there any way to set up excel to NOT do this (perhaps some setting in Excel that pertains to reading tab delimited files), or am I missing something?
Thanks.
Save your file as .txt
Now open the file in excel using Drag and Drop (rather than double clicking your hookey .xls)
Slightly more work to open the file, but your tab text formatting will now be respected.
When you open the tab-delimited file, you are shown an import mapping dialog that lets you pick each columns' data type (date, text, currency, etc.). For the columns that have HTML data present, choose text. This will tell it basically to import as-is and not try to automatically parse the data into a derived format.
Excel 2003 does the same. I don't think there is a way to do it with a config because Excel finds delimiters in the html table and breaks the html in cells and columns as it does for the other columns.
If the column containing html is always the same, you can use JYelton suggestion of renaming the file as csv and record a small VBA macro to load the file selecting automatically the html column as text in the import mapping dialog and you load the file calling the macro instead of double-clicking on the file.
If nothing else, import it into OpenOffice.org Calc, save as an .xls file, then open in Excel.

Resources