Clear[DataSet1, DataSet2, DataSet3, DataSet4,DataSet5,DataSet6, DataSet7, DataSet8, DataSet12, DataSet13, DataSet14, DataSet15, DataSet16, DataSet17, DataSet18, DataSetFull, Plot1, Plot2, Plot3, Plot4, DataSet1b, DataSet2b, DataSet3b, DataSet4b,DataSet5b,DataSet6b, DataSet7b, DataSet8b, DataSet12b, DataSet13b, DataSet14b, DataSet15b, DataSet16b, DataSet17b, DataSet18b, DataSetFull, Plot2,DataSetFullb,Dimensions2, DataSet9]
path="C:\\Users\\rottreat\\";
SetDirectory[path<>"\\Desktop"];
FileNames[];
Data=Import["t-butanol sl.xlsx"];
Data;
DataPoints=Length[Data[[1]]]-1;

(*sheet one*)
Clear[IMelting, Size, ISize]
IMelting=List[Data[[1, 2, 3]]];
AppendTo[IMelting, Data[[1, 3, 3]]];
AppendTo[IMelting, Data[[1, 4, 3]]];
AppendTo[IMelting, Data[[1, 5, 3]]];
AppendTo[IMelting, Data[[1, 6, 3]]];
AppendTo[IMelting, Data[[1, 7, 3]]];
AppendTo[IMelting, Data[[1, 8, 3]]];
AppendTo[IMelting, Data[[1, 9, 3]]];
AppendTo[IMelting, Data[[1, 10, 3]]];
AppendTo[IMelting, Data[[1, 11, 3]]];
AppendTo[IMelting, Data[[1, 12, 3]]];
AppendTo[IMelting, Data[[1, 13, 3]]];
AppendTo[IMelting, Data[[1, 14, 3]]];
AppendTo[IMelting, Data[[1, 15, 3]]];
AppendTo[IMelting, Data[[1, 17, 3]]];
AppendTo[IMelting, Data[[1, 18, 3]]];
AppendTo[IMelting, Data[[1, 19, 3]]];
AppendTo[IMelting, Data[[1, 20, 3]]];
AppendTo[IMelting, Data[[1, 21, 3]]];
AppendTo[IMelting, Data[[1, 22, 3]]];


Size=List[Data[[1, 2, 4]]];
AppendTo[Size, Data[[1, 3, 4]]];
AppendTo[Size, Data[[1, 4, 4]]];
AppendTo[Size, Data[[1, 5, 4]]];
AppendTo[Size, Data[[1, 6, 4]]];
AppendTo[Size, Data[[1, 7, 4]]];
AppendTo[Size, Data[[1, 8, 4]]];
AppendTo[Size, Data[[1, 9, 4]]];
AppendTo[Size, Data[[1, 10, 4]]];
AppendTo[Size, Data[[1, 11, 4]]];
AppendTo[Size, Data[[1, 12, 4]]];
AppendTo[Size, Data[[1, 13, 4]]];
AppendTo[Size, Data[[1, 14, 4]]];
AppendTo[Size, Data[[1, 15, 4]]];
AppendTo[Size, Data[[1, 17, 4]]];
AppendTo[Size, Data[[1, 18, 4]]];
AppendTo[Size, Data[[1, 19, 4]]];
AppendTo[Size, Data[[1, 20, 4]]];
AppendTo[Size, Data[[1, 21, 4]]];
AppendTo[Size, Data[[1, 22, 4]]];

DataSet1=Partition[Riffle[IMelting, Size], 2];

DataSetFull=Partition[Flatten[DataSet1], 2];
Dimensions[DataSetFull];

squareR=Graphics[{Red, Polygon[{{-.01,-.01},{.01,-.01},{.01,.01},{-.01,.01}}]}];


imagesize={600,400};
Plot1a=ListPlot[{ DataSet1}, AxesOrigin->{0, 0}, PlotRange->{{0, 1.2}, {0, 162}};

PlotMarkers->{squareR, 0.018}, Frame-> True, FrameLabel->{"inverse ΔT / (K^(-1))  ⟶", "Pore size / nm   ⟶"}, LabelStyle->{18,FontFamily->Arial}, ImageSize-> imagesize , AspectRatio->1];


Plot2=ListPlot[DataSetFull, PlotStyle->{Magenta, Large},  PlotRange->All, AxesOrigin->{0, 0}];

(*calculating KcCylindrical*)
delH= 6.7*10^3 (*J mol-1*);
Tm=298.15(*K*);
dens=0.997 (*g cm-3*);
v=95.64*10^-6 (*m3 mol-1, molar volume*);
gammasl=14 *10^-3(*J m-2*);

KcCylindrical=2*v*gammasl*Tm/delH (* m K *);
m=KcCylindrical/10^-9;

FindFit[DataSetFull,c+m*x,c,x];
Fit1=NonlinearModelFit[DataSetFull,c+m*x,c,x];
Fit2=NonlinearModelFit[DataSetFull,c+k*x,{k, c},x];
Fit1[{"ParameterTable", "RSquared", "BestFitParameters"}]
Fit1b[{"ParameterTable", "RSquared", "BestFitParameters"}];
Fit1=Normal[Fit1];
Fit2=Normal[Fit2];
line1=Plot[Fit1,{x,-0.09,1.15},AxesOrigin->{0, 0}];
line2=Plot[Fit2,{x,-0.09,1.15},AxesOrigin->{0, 0}];
a=Show[Plot1a,  line1 ]
(**Export["graph.png", a] 
Export["data.csv", DataSetFull]*)