I am running into an issue while trying to plot the data I have imported into Excel from a csv file. I have plotted csv files like these in the past using older versions of Microsoft Excel but the newest version of Excel is giving me problems.
First, I imported the data from my csv file by navigating to Data>From Text/CSV>, then selecting the csv file, >Import>Load. The data seems to have imported correctly. But then when I select my data and hit Insert>Scatter with Smooth Lines, it doesn't graph correctly: Default Wizard's Resulting Graph (Actual Result).
After enabling the Legacy wizard from File>Options>Data, and importing the csv file from Data>Get Data>Legacy Wizards>From Text (Legacy), the data can be plotted like in older versions of Excel: Legacy Wizard's Resulting Graph (Desired Result).
Do note that for both of these cases, I selected the same cells and then plotted the data. But in the default wizard, it doesn't work. When I try to select the columns individually, the y-values all turn to 0; similar to this unanswered query. I tried converting the formats to "Number" instead of "General" but it does not help.
How do I plot csv data that is imported using the latest version of Excel? Thanks in advance!
Edit: Here is the raw CSV file for reference
Time of Export: 2021-03-30 1:10:00,,,,
Start Date / Time: 2021-03-30 12:00:00,,,,
End Date / Time: 2021-03-30 12:30:00,,,,
Sample Rate: 1 minute(s),,,,
,Temperature Probe 1,Temperature Probe 2,Temperature Probe 3,Temperature Probe 4
TimeStamp,TP 1001 temperature (ーC),TP 1002 temperature (ーC),TP 1003 temperature (ーC),TP 1004 temperature (ーC)
2/2/2021 12:00,23.23676,0,20.62355,21.99797
2/2/2021 12:01,22.48625,0,20.65972,21.84425
2/2/2021 12:02,21.63628,0,20.53313,21.84425
2/2/2021 12:03,20.52409,0,20.3975,21.70863
2/2/2021 12:04,19.23105,0,20.44271,21.6815
2/2/2021 12:05,17.82046,0,20.30708,21.49161
2/2/2021 12:06,16.2019,0,20.23473,21.18417
2/2/2021 12:07,14.29398,0,19.76454,20.99429
2/2/2021 12:08,12.23235,0,19.49327,20.55122
2/2/2021 12:09,9.998917,0,18.95074,19.89113
2/2/2021 12:10,7.964409,0,18.30874,19.42094
2/2/2021 12:11,5.749062,0,17.60344,18.68851
2/2/2021 12:12,3.316696,0,17.27792,18.12789
2/2/2021 12:13,1.11039,0,16.52741,17.63961
2/2/2021 12:14,-1.493782,0,15.50564,16.91623
2/2/2021 12:15,-3.645836,0,14.65567,16.22902
2/2/2021 12:16,-5.598961,0,13.49826,15.11683
2/2/2021 12:17,-7.714844,0,12.57595,14.48387
2/2/2021 12:18,-9.866898,0,11.40046,13.3988
2/2/2021 12:19,-11.69344,0,11.21058,12.9919
2/2/2021 12:20,-14.09867,0,10.22497,12.12384
2/2/2021 12:21,-16.55816,0,9.519676,11.59035
2/2/2021 12:22,-18.64692,0,8.588326,10.8308
2/2/2021 12:23,-20.63622,0,7.693146,10.17072
2/2/2021 12:24,-22.58029,0,7.204865,9.809029
2/2/2021 12:25,-25.03979,0,6.192131,8.515984
2/2/2021 12:26,-27.01099,0,4.817711,7.575592
2/2/2021 12:27,-29.67846,0,4.085289,6.445313
2/2/2021 12:28,-31.88477,0,3.072556,5.712891
2/2/2021 12:29,-33.65704,0,2.765121,5.387367
2/2/2021 12:30,-35.41124,0,2.48481,4.636864
---------------------------------------------,,,,
Although removing the first five rows, and promoting the sixth to be the header, is a quick fix; if you want to retain the topmost information, you will need to combine those six rows, and then promote them.
<linefeed>
as the separatorThe disadvantage of this method is that there will be a lot of information in the first row, instead of it being split into separate rows
M Code
let
Source = Csv.Document(File.Contents("C:\Users\ron\Desktop\sampledata.csv"),[Delimiter=",", Columns=5, Encoding=1252, QuoteStyle=QuoteStyle.None]),
#"Transposed Table" = Table.Transpose(Source),
#"Merged Columns" = Table.CombineColumns(#"Transposed Table",
{"Column1", "Column2", "Column3", "Column4", "Column5", "Column6"},
Combiner.CombineTextByDelimiter("#(lf)", QuoteStyle.None),"Merged"),
#"Transposed Table1" = Table.Transpose(#"Merged Columns"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table1", [PromoteAllScalars=true]),
#"Changed Type" = Table.TransformColumnTypes(#"Promoted Headers",{
{"Time of Export: 2021-03-30 1:10:00#(lf)Start Date / Time: 2021-03-30 12:00:00#(lf)End Date / Time: 2021-03-30 12:30:00#(lf)Sample Rate: 1 minute(s)#(lf)#(lf)TimeStamp", type datetime},
{"#(lf)#(lf)#(lf)#(lf)Temperature Probe 1#(lf)TP 1001 temperature (ï½°C)", type number},
{"#(lf)#(lf)#(lf)#(lf)Temperature Probe 2#(lf)TP 1002 temperature (ï½°C)", Int64.Type},
{"#(lf)#(lf)#(lf)#(lf)Temperature Probe 3#(lf)TP 1003 temperature (ï½°C)", type number},
{"#(lf)#(lf)#(lf)#(lf)Temperature Probe 4#(lf)TP 1004 temperature (ï½°C)", type number}})
in
#"Changed Type"
Results from your data
The values to be plotted are now numeric