Submit Search
Upload
Import data from csv excel file and export to xml excel file in c programming
•
0 likes
•
42 views
S
Salar Delavar Qashqai
Follow
Written by salar delavar qashqai Salardqashqai.blogfa.com
Read less
Read more
Engineering
Report
Share
Report
Share
1 of 7
Download now
Download to read offline
Recommended
Listing for MyNumberFormats
Listing for MyNumberFormats
Derek Dhammaloka
Understanding storage class using nm
Understanding storage class using nm
mohamed sikander
array implementation
array implementation
Sathya Ds
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
Anushka Rai
Pegomock, a mocking framework for Go
Pegomock, a mocking framework for Go
Peter Goetz
syed
syed
Syed Mohd Naqi Zaidi
SPL 11.1 | Problems on Loop , Nested Loop
SPL 11.1 | Problems on Loop , Nested Loop
Mohammad Imam Hossain
Function basics
Function basics
mohamed sikander
Recommended
Listing for MyNumberFormats
Listing for MyNumberFormats
Derek Dhammaloka
Understanding storage class using nm
Understanding storage class using nm
mohamed sikander
array implementation
array implementation
Sathya Ds
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
COMPUTER SCIENCE CLASS 12 PRACTICAL FILE
Anushka Rai
Pegomock, a mocking framework for Go
Pegomock, a mocking framework for Go
Peter Goetz
syed
syed
Syed Mohd Naqi Zaidi
SPL 11.1 | Problems on Loop , Nested Loop
SPL 11.1 | Problems on Loop , Nested Loop
Mohammad Imam Hossain
Function basics
Function basics
mohamed sikander
Model-View-Update, and Beyond!
Model-View-Update, and Beyond!
Simon Fowler
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
KushShah65
React London April- Fully functional: Central state is a great fit for React ...
React London April- Fully functional: Central state is a great fit for React ...
React London Community
systems programming lab programs in c
systems programming lab programs in c
Meghna Roy
Pushover analysis force analogy method with force control based on euler bern...
Pushover analysis force analogy method with force control based on euler bern...
Salar Delavar Qashqai
Python program
Python program
nuripatidar
Quiz using C++
Quiz using C++
Sushil Mishra
Mouse programming in c
Mouse programming in c
gkgaur1987
Pushover analysis force analogy method with force control based on timoshenko...
Pushover analysis force analogy method with force control based on timoshenko...
Salar Delavar Qashqai
computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)
Nitish Yadav
Stl algorithm-Basic types
Stl algorithm-Basic types
mohamed sikander
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
C++ programs
C++ programs
Mukund Gandrakota
Logic development
Logic development
Jerin John
Mock geecon2
Mock geecon2
Michał Lipski
Pratik Bakane C++
Pratik Bakane C++
pratikbakane
Excelマクロはじめの一歩
Excelマクロはじめの一歩
Ayumu Hanba
Effective C#
Effective C#
lantoli
C++ file
C++ file
Mukund Trivedi
Basic program in java
Basic program in java
Sudeep Singh
Moving Average Filter in C
Moving Average Filter in C
Colin
Geometric and material nonlinearity analysis of 2 d truss with force and duct...
Geometric and material nonlinearity analysis of 2 d truss with force and duct...
Salar Delavar Qashqai
More Related Content
What's hot
Model-View-Update, and Beyond!
Model-View-Update, and Beyond!
Simon Fowler
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
KushShah65
React London April- Fully functional: Central state is a great fit for React ...
React London April- Fully functional: Central state is a great fit for React ...
React London Community
systems programming lab programs in c
systems programming lab programs in c
Meghna Roy
Pushover analysis force analogy method with force control based on euler bern...
Pushover analysis force analogy method with force control based on euler bern...
Salar Delavar Qashqai
Python program
Python program
nuripatidar
Quiz using C++
Quiz using C++
Sushil Mishra
Mouse programming in c
Mouse programming in c
gkgaur1987
Pushover analysis force analogy method with force control based on timoshenko...
Pushover analysis force analogy method with force control based on timoshenko...
Salar Delavar Qashqai
computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)
Nitish Yadav
Stl algorithm-Basic types
Stl algorithm-Basic types
mohamed sikander
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
SaraswathiRamalingam
C++ programs
C++ programs
Mukund Gandrakota
Logic development
Logic development
Jerin John
Mock geecon2
Mock geecon2
Michał Lipski
Pratik Bakane C++
Pratik Bakane C++
pratikbakane
Excelマクロはじめの一歩
Excelマクロはじめの一歩
Ayumu Hanba
Effective C#
Effective C#
lantoli
C++ file
C++ file
Mukund Trivedi
Basic program in java
Basic program in java
Sudeep Singh
What's hot
(20)
Model-View-Update, and Beyond!
Model-View-Update, and Beyond!
Informatics Practices/ Information Practices Project (IP Project Class 12)
Informatics Practices/ Information Practices Project (IP Project Class 12)
React London April- Fully functional: Central state is a great fit for React ...
React London April- Fully functional: Central state is a great fit for React ...
systems programming lab programs in c
systems programming lab programs in c
Pushover analysis force analogy method with force control based on euler bern...
Pushover analysis force analogy method with force control based on euler bern...
Python program
Python program
Quiz using C++
Quiz using C++
Mouse programming in c
Mouse programming in c
Pushover analysis force analogy method with force control based on timoshenko...
Pushover analysis force analogy method with force control based on timoshenko...
computer project code ''payroll'' (based on datafile handling)
computer project code ''payroll'' (based on datafile handling)
Stl algorithm-Basic types
Stl algorithm-Basic types
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
PROGRAMMING USING C# .NET - SARASWATHI RAMALINGAM
C++ programs
C++ programs
Logic development
Logic development
Mock geecon2
Mock geecon2
Pratik Bakane C++
Pratik Bakane C++
Excelマクロはじめの一歩
Excelマクロはじめの一歩
Effective C#
Effective C#
C++ file
C++ file
Basic program in java
Basic program in java
Similar to Import data from csv excel file and export to xml excel file in c programming
Moving Average Filter in C
Moving Average Filter in C
Colin
Geometric and material nonlinearity analysis of 2 d truss with force and duct...
Geometric and material nonlinearity analysis of 2 d truss with force and duct...
Salar Delavar Qashqai
R Language
R Language
ShwetDadhaniya1
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
HamHam' Kc
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)
Seenton Pukjira
การเขียนคำสั่งควบคุมขั้นพื้นฐาน
การเขียนคำสั่งควบคุมขั้นพื้นฐาน
HamHam' Kc
เธเธฒเธฃเน€เธ เธขเธเธเธณเธช _เธเธเธงเธเธ_เธกเธ__เธเธ__เธเธเธฒเธ
เธเธฒเธฃเน€เธ เธขเธเธเธณเธช _เธเธเธงเธเธ_เธกเธ__เธเธ__เธเธเธฒเธ
Boom Baphomet
Pnno
Pnno
shristichaudhary4
Concepts of C [Module 2]
Concepts of C [Module 2]
Abhishek Sinha
C- Programming Assignment 3
C- Programming Assignment 3
Animesh Chaturvedi
C Programming
C Programming
Sumant Diwakar
Compiler design lab
Compiler design lab
ilias ahmed
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Salar Delavar Qashqai
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Salar Delavar Qashqai
The Ring programming language version 1.2 book - Part 30 of 84
The Ring programming language version 1.2 book - Part 30 of 84
Mahmoud Samir Fayed
C Programming Example
C Programming Example
PRATHAMESH DESHPANDE
The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181
Mahmoud Samir Fayed
C Programming Example
C Programming Example
University of Potsdam
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04
hassaanciit
week-2x
week-2x
KITE www.kitecolleges.com
Similar to Import data from csv excel file and export to xml excel file in c programming
(20)
Moving Average Filter in C
Moving Average Filter in C
Geometric and material nonlinearity analysis of 2 d truss with force and duct...
Geometric and material nonlinearity analysis of 2 d truss with force and duct...
R Language
R Language
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (1)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)
การเข ยนคำส _งควบค_มข__นพ__นฐาน (2)
การเขียนคำสั่งควบคุมขั้นพื้นฐาน
การเขียนคำสั่งควบคุมขั้นพื้นฐาน
เธเธฒเธฃเน€เธ เธขเธเธเธณเธช _เธเธเธงเธเธ_เธกเธ__เธเธ__เธเธเธฒเธ
เธเธฒเธฃเน€เธ เธขเธเธเธณเธช _เธเธเธงเธเธ_เธกเธ__เธเธ__เธเธเธฒเธ
Pnno
Pnno
Concepts of C [Module 2]
Concepts of C [Module 2]
C- Programming Assignment 3
C- Programming Assignment 3
C Programming
C Programming
Compiler design lab
Compiler design lab
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
Critical buckling load geometric nonlinearity analysis of springs with rigid ...
The Ring programming language version 1.2 book - Part 30 of 84
The Ring programming language version 1.2 book - Part 30 of 84
C Programming Example
C Programming Example
The Ring programming language version 1.5.2 book - Part 41 of 181
The Ring programming language version 1.5.2 book - Part 41 of 181
C Programming Example
C Programming Example
Introduction to Computer and Programing - Lecture 04
Introduction to Computer and Programing - Lecture 04
week-2x
week-2x
More from Salar Delavar Qashqai
Pushover 2order (p delta effect) analysis force analogy method with force con...
Pushover 2order (p delta effect) analysis force analogy method with force con...
Salar Delavar Qashqai
Pushover analysis of frame by force analogy method with force control based o...
Pushover analysis of frame by force analogy method with force control based o...
Salar Delavar Qashqai
Geometric nonlinearity analysis of springs with rigid element displacement co...
Geometric nonlinearity analysis of springs with rigid element displacement co...
Salar Delavar Qashqai
Nonlinear analysis of braced frame with hinge by hinge method in c programming
Nonlinear analysis of braced frame with hinge by hinge method in c programming
Salar Delavar Qashqai
Truss optimization with excel solver
Truss optimization with excel solver
Salar Delavar Qashqai
Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...
Salar Delavar Qashqai
Pushover analysis of simply support steel section beam based on plastic hinge...
Pushover analysis of simply support steel section beam based on plastic hinge...
Salar Delavar Qashqai
Pushover analysis of steel section beam subjected to incremental vertical loa...
Pushover analysis of steel section beam subjected to incremental vertical loa...
Salar Delavar Qashqai
Moment curvature analysis of unconfined concrete section with matlab and sap2000
Moment curvature analysis of unconfined concrete section with matlab and sap2000
Salar Delavar Qashqai
Large deformation analysis of cantilever beam subjected to concentrated const...
Large deformation analysis of cantilever beam subjected to concentrated const...
Salar Delavar Qashqai
Moment curvature analysis unconfined concrete section with different tension...
Moment curvature analysis unconfined concrete section with different tension...
Salar Delavar Qashqai
Optimization of steel section based on moment and section ductility
Optimization of steel section based on moment and section ductility
Salar Delavar Qashqai
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Salar Delavar Qashqai
Elastic response pseudo spectrum in c programming
Elastic response pseudo spectrum in c programming
Salar Delavar Qashqai
Structural eigen value analysis in c programming
Structural eigen value analysis in c programming
Salar Delavar Qashqai
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
Salar Delavar Qashqai
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
Salar Delavar Qashqai
Moment curvature analysis confined concrete section in matlab
Moment curvature analysis confined concrete section in matlab
Salar Delavar Qashqai
Moment curvature analysis of unconfined circular concrete pipe section with m...
Moment curvature analysis of unconfined circular concrete pipe section with m...
Salar Delavar Qashqai
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Salar Delavar Qashqai
More from Salar Delavar Qashqai
(20)
Pushover 2order (p delta effect) analysis force analogy method with force con...
Pushover 2order (p delta effect) analysis force analogy method with force con...
Pushover analysis of frame by force analogy method with force control based o...
Pushover analysis of frame by force analogy method with force control based o...
Geometric nonlinearity analysis of springs with rigid element displacement co...
Geometric nonlinearity analysis of springs with rigid element displacement co...
Nonlinear analysis of braced frame with hinge by hinge method in c programming
Nonlinear analysis of braced frame with hinge by hinge method in c programming
Truss optimization with excel solver
Truss optimization with excel solver
Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of triangular steel membrane element subjected to lateral d...
Pushover analysis of simply support steel section beam based on plastic hinge...
Pushover analysis of simply support steel section beam based on plastic hinge...
Pushover analysis of steel section beam subjected to incremental vertical loa...
Pushover analysis of steel section beam subjected to incremental vertical loa...
Moment curvature analysis of unconfined concrete section with matlab and sap2000
Moment curvature analysis of unconfined concrete section with matlab and sap2000
Large deformation analysis of cantilever beam subjected to concentrated const...
Large deformation analysis of cantilever beam subjected to concentrated const...
Moment curvature analysis unconfined concrete section with different tension...
Moment curvature analysis unconfined concrete section with different tension...
Optimization of steel section based on moment and section ductility
Optimization of steel section based on moment and section ductility
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Nonlinear analysis of 2 d cantilever nonprismatic beam with plastic hinge con...
Elastic response pseudo spectrum in c programming
Elastic response pseudo spectrum in c programming
Structural eigen value analysis in c programming
Structural eigen value analysis in c programming
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
Analysis of 1st order and 2nd order nonlinear semi rigid connection braced fr...
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
Analysis of 1st order and 2nd order nonlinear semi rigid connection frame sub...
Moment curvature analysis confined concrete section in matlab
Moment curvature analysis confined concrete section in matlab
Moment curvature analysis of unconfined circular concrete pipe section with m...
Moment curvature analysis of unconfined circular concrete pipe section with m...
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Nonlinear analysis of fixed support beam with hinge by hinge method in c prog...
Recently uploaded
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
DeepakSakkari2
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
dollysharma2066
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes examples
Dr. Gudipudi Nageswara Rao
pipeline in computer architecture design
pipeline in computer architecture design
ssuser87fa0c1
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
Asst.prof M.Gokilavani
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
GDSCAESB
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
LewisJB
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
9953056974 Low Rate Call Girls In Saket, Delhi NCR
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Low Rate Call Girls In Saket, Delhi NCR
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
C Sai Kiran
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
britheesh05
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
RajaP95
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
VICTOR MAESTRE RAMIREZ
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
Asst.prof M.Gokilavani
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
eptoze12
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
9953056974 Low Rate Call Girls In Saket, Delhi NCR
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
wendy cai
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
roselinkalist12
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ
Effects of rheological properties on mixing
Effects of rheological properties on mixing
viprabot1
Recently uploaded
(20)
Biology for Computer Engineers Course Handout.pptx
Biology for Computer Engineers Course Handout.pptx
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
Call Us ≽ 8377877756 ≼ Call Girls In Shastri Nagar (Delhi)
POWER SYSTEMS-1 Complete notes examples
POWER SYSTEMS-1 Complete notes examples
pipeline in computer architecture design
pipeline in computer architecture design
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
GDSC ASEB Gen AI study jams presentation
GDSC ASEB Gen AI study jams presentation
Work Experience-Dalton Park.pptxfvvvvvvv
Work Experience-Dalton Park.pptxfvvvvvvv
young call girls in Green Park🔝 9953056974 🔝 escort Service
young call girls in Green Park🔝 9953056974 🔝 escort Service
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
9953056974 Call Girls In South Ex, Escorts (Delhi) NCR.pdf
Introduction to Machine Learning Unit-3 for II MECH
Introduction to Machine Learning Unit-3 for II MECH
Artificial-Intelligence-in-Electronics (K).pptx
Artificial-Intelligence-in-Electronics (K).pptx
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
Software and Systems Engineering Standards: Verification and Validation of Sy...
Software and Systems Engineering Standards: Verification and Validation of Sy...
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
CCS355 Neural Network & Deep Learning UNIT III notes and Question bank .pdf
Oxy acetylene welding presentation note.
Oxy acetylene welding presentation note.
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
VICTOR MAESTRE RAMIREZ - Planetary Defender on NASA's Double Asteroid Redirec...
Effects of rheological properties on mixing
Effects of rheological properties on mixing
Import data from csv excel file and export to xml excel file in c programming
1.
>> IN THE NAME OF GOD << Import Data from CSV EXCEL file and Export to XML EXCEL file in C programming C program is written by Salar Delavar Ghashghaei – Publication Date: 27/May/2018 E‐mail: salar.d.ghashghaei@gmail.com C Code: #include <conio.h> #include <stdio.h> #include
<windows.h> #define N 10000 #define ShowText01 "CSV_C_XMLexcel-input.csv" #define ShowText02 "outputXML.xml" void IMPORT_DATA01(double X[],double Y[],int &n); void MessageCheck_IMPORT_DATA01(double X[],double Y[],int n); void MessageErrorReportTEXT(); void DATA_TABLE(double X[],double Y[],int n); void OUTPUT_XML(double X[],double Y[],int n,const char SheetName[],const char TableName[],int NumCol,int NumRow,int FontSize); int main(){ int n,NumCol,NumRow,FontSize; double X[N],Y[N]; char SheetName[50],TableName[50]; IMPORT_DATA01(X,Y,n); MessageCheck_IMPORT_DATA01(X,Y,n); DATA_TABLE(X,Y,n); OUTPUT_XML(X,Y,n,"DATA_TABLE","X_Y Data",2,n,11); system("start /w outputXML.xml"); getch(); return 0; } void IMPORT_DATA01(double X[],double Y[],int &n){ int i = 0; FILE *InputFile; InputFile = fopen(ShowText01, "r"); if (!InputFile){ MessageErrorReportTEXT(); printf(" File is not available! -> [%s] n",ShowText01); Sleep(6000); exit(1); } char line[1000]; do{ fscanf(InputFile,"%lf,%lf",&X[i],&Y[i]); //printf("%d - X[%d]: %lf - Y[%d]: %lfn",i,i,X[i],i,Y[i]); i++; }
2.
while(i < N
&& fgets(line,sizeof(line),InputFile) != NULL); n = i-1; } void MessageCheck_IMPORT_DATA01(double X[],double Y[],int n){ int i; for(i=0;i<n;i++){ if (X[i] < 0 || Y[i] < 0 ){ MessageErrorReportTEXT(); printf(" Please check the input file! -> [%s]n",ShowText01); printf(" Row %d has a negative value.n",i+1); printf("n X[%d]: %f - ",i+1,X[i]);printf("Y[%d]: %fn",i+1,Y[i]); printf(" *** Negative data input value is not acceptable ***n"); Sleep(40000); exit(1); } } } void MessageErrorReportTEXT(){ int i; char Ql; Ql=176; printf("an "); for (i=1;i<50;i++) printf("%c",Ql); printf(" Error Report "); for (i=1;i<50;i++) printf("%c",Ql); printf("n"); } void DATA_TABLE(double X[],double Y[],int n){ int i; char Qa,Qb,Qc,Qd,Qe,Qf; int BB=201,CC=205,DD=187,EE=200,FF=188,GG=186; Qa=BB;Qb=CC;Qc=DD;Qd=EE;Qe=FF;Qf=GG; printf(" %c",Qa); for (i=1;i<45;i++) printf("%c",Qb); printf("%cn",Qc); printf(" %c X-Y Data Table %cn",Qf,Qf); printf(" %c Number X Y %cn",Qf,Qf); printf(" %c",Qd); for (i=1;i<45;i++) printf("%c",Qb); printf("%cn",Qe); for(i=0;i<n;i++) printf("t %d %.3e %.3en",i+1,X[i],Y[i]); } void OUTPUT_XML(double X[],double Y[],int n,const char SheetName[],const char TableName[],int NumCol,int NumRow,int FontSize){ FILE *OutputFile; OutputFile = fopen(ShowText02, "w");
3.
fprintf(OutputFile,"<?xml version="1.0"?>n"); fprintf(OutputFile,"<?mso-application progid="Excel.Sheet"?>
n"); fprintf(OutputFile,"<Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet" n"); fprintf(OutputFile,"xmlns:o="urn:schemas-microsoft-com:office:office" n"); fprintf(OutputFile,"xmlns:x="urn:schemas-microsoft-com:office:excel" n"); fprintf(OutputFile,"xmlns:ss="urn:schemas-microsoft-com:office:spreadsheet" n"); fprintf(OutputFile,"xmlns:html="http://www.w3.org/TR/REC-html40"> n"); fprintf(OutputFile,"<DocumentProperties xmlns="urn:schemas-microsoft-com:office:office"> n"); fprintf(OutputFile,"<Author>SALAR DELAVAR GHASHGHAEI</Author> n"); fprintf(OutputFile,"<LastAuthor>Windows User</LastAuthor> n"); fprintf(OutputFile,"<Created>2019-05-27T12:20:49Z</Created> n"); fprintf(OutputFile,"<Version>15.00</Version> n"); fprintf(OutputFile,"</DocumentProperties> n"); fprintf(OutputFile,"<OfficeDocumentSettings xmlns="urn:schemas-microsoft-com:office:office"> n"); fprintf(OutputFile,"<AllowPNG/> n"); fprintf(OutputFile,"</OfficeDocumentSettings> n"); fprintf(OutputFile,"<ExcelWorkbook xmlns="urn:schemas-microsoft-com:office:excel"> n"); fprintf(OutputFile,"<WindowHeight>7905</WindowHeight> n"); fprintf(OutputFile,"<WindowWidth>20490</WindowWidth> n"); fprintf(OutputFile,"<WindowTopX>0</WindowTopX> n"); fprintf(OutputFile,"<WindowTopY>0</WindowTopY> n"); fprintf(OutputFile,"<ProtectStructure>False</ProtectStructure> n"); fprintf(OutputFile,"<ProtectWindows>False</ProtectWindows> n"); fprintf(OutputFile,"</ExcelWorkbook> n"); fprintf(OutputFile,"<Styles> n"); fprintf(OutputFile,"<Style ss:ID="Default" ss:Name="Normal"> n"); fprintf(OutputFile,"<Alignment ss:Vertical="Bottom"/> n"); fprintf(OutputFile,"<Borders/> n"); fprintf(OutputFile,"<Font ss:FontName="Calibri" x:Family="Swiss" ss:Size="%d" ss:Color="#00FF00"/> n",FontSize);/////////// fprintf(OutputFile,"<Interior/> n"); fprintf(OutputFile,"<NumberFormat/> n"); fprintf(OutputFile,"<Protection/> n"); fprintf(OutputFile,"</Style> n"); fprintf(OutputFile,"<Style ss:ID="s73"> n"); fprintf(OutputFile,"<Alignment ss:Horizontal="Center" ss:Vertical="Center"/> n"); fprintf(OutputFile,"<Borders> n"); fprintf(OutputFile,"<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> n"); fprintf(OutputFile,"<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> n"); fprintf(OutputFile,"<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> n"); fprintf(OutputFile,"<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> n"); fprintf(OutputFile,"</Borders> n"); fprintf(OutputFile,"</Style> n"); fprintf(OutputFile,"<Style ss:ID="s74"> n"); fprintf(OutputFile,"<Alignment ss:Horizontal="Center" ss:Vertical="Center"/> n"); fprintf(OutputFile,"<Borders> n"); fprintf(OutputFile,"<Border ss:Position="Bottom" ss:LineStyle="Continuous" ss:Weight="1"/> n"); fprintf(OutputFile,"<Border ss:Position="Left" ss:LineStyle="Continuous" ss:Weight="1"/> n"); fprintf(OutputFile,"<Border ss:Position="Right" ss:LineStyle="Continuous" ss:Weight="1"/> n"); fprintf(OutputFile,"<Border ss:Position="Top" ss:LineStyle="Continuous" ss:Weight="1"/> n"); fprintf(OutputFile,"</Borders> n"); fprintf(OutputFile,"</Style> n");
4.
fprintf(OutputFile,"</Styles> n"); fprintf(OutputFile,"<Worksheet ss:Name="%s">
n",SheetName); fprintf(OutputFile,"<Table ss:ExpandedColumnCount="%d" ss:ExpandedRowCount="%d" x:FullColumns="1" n",NumCol,NumRow+1); fprintf(OutputFile,"x:FullRows="1" ss:DefaultRowHeight="15"> n"); fprintf(OutputFile,"<Row> n"); fprintf(OutputFile,"<Cell ss:MergeAcross="%d" ss:StyleID="s73"><Data ss:Type="String">%s</Data></Cell> n",NumCol-1,TableName);/// fprintf(OutputFile,"</Row> n"); for (int i=0;i<n;i++){ fprintf(OutputFile,"<Row> n"); fprintf(OutputFile,"<Cell ss:StyleID="s74"><Data ss:Type="String">%.5e</Data></Cell> n",X[i]);/// fprintf(OutputFile,"<Cell ss:StyleID="s74"><Data ss:Type="String">%.5e</Data></Cell> n",Y[i]);/// fprintf(OutputFile,"</Row> n"); } fprintf(OutputFile,"</Table> n"); fprintf(OutputFile,"<WorksheetOptions xmlns="urn:schemas-microsoft-com:office:excel"> n"); fprintf(OutputFile,"<PageSetup> n"); fprintf(OutputFile,"<Header x:Margin="0.3"/> n"); fprintf(OutputFile,"<Footer x:Margin="0.3"/> n"); fprintf(OutputFile,"<PageMargins x:Bottom="0.75" x:Left="0.7" x:Right="0.7" x:Top="0.75"/> n"); fprintf(OutputFile,"</PageSetup> n"); fprintf(OutputFile,"<Selected/> n"); fprintf(OutputFile,"<ProtectObjects>False</ProtectObjects> n"); fprintf(OutputFile,"<ProtectScenarios>False</ProtectScenarios> n"); fprintf(OutputFile,"</WorksheetOptions> n"); fprintf(OutputFile,"</Worksheet> n"); fprintf(OutputFile,"</Workbook> n"); fclose(OutputFile); }
5.
Plot : Figure(1) Input data in CSV
6.
Figure(2) Analysis data in C
7.
Figure(3) Output data in XML EXCEL
Download now