Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

C18 v3.47 reading an excel file

Status
Not open for further replies.

giz.mo

Newbie level 4
Joined
Jul 1, 2015
Messages
6
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
60
Hello all,

I write my codes in C language and use PIC18 Explorer board with PIC18F8722. I have included <stdio.h> file and tried to read an Excel file with fopen and fscanf. However I just noticed that those functions are not defined in the stdio.h file within C18 Compiler. So is that impossible to read Excel file with C18 Compiler or is there another way? I really need help. Thank you for your replies.
:smile:

giz.mo
 

First, where is the Excel file located? Does your board include some kind of secondary memory like SDCard? And do your software routines include a filesystem interface (e.g. FAT32)?

If yes, here is the next problem to take on: The Excel file has it's own format. Unless the file is saved in Excel's CSV format, it may not be easy to read and interpret the file. I would suggest writing the routines on a standard PC and then port them to microcontroller.

Out of curiosity: What is the application that requires a microcontroller reading Excel file?
 
  • Like
Reactions: giz.mo

    giz.mo

    Points: 2
    Helpful Answer Positive Rating
Thanks for your reply. Actually it turned out that it does not have to be an excel file. What I am trying to do is, make the microcontroller read a lookup table from PC, record it in an array for example and than use that array for further processes in my software. I am totally new with microcontrollers and Excel file looked to me an elegant solution but there might be a fundamental misunerstanding about the microcontrollers 8-O
 

Excell format is quite complicated. You can use it to create data tables but export them as CSV format. This puts the values in sequence with a comma between them and it omits all the 'baggage' that makes up the spreadsheet background data.

It's easy then to import the table into a compiler by simply copy and paste from the exported CSV file straight into the source code.

Brian.
 
  • Like
Reactions: giz.mo

    giz.mo

    Points: 2
    Helpful Answer Positive Rating
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top