Click here to Skip to main content
15,885,216 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everyone,
I need to know how can we send data form Excel to serial port?
My purpose is to display Excel data on Seven Segment.
I know it involves MCU programming.
Can anybody guide me or suggest me any other method?

Thanks and regards,
M. Mohsin
Posted

This question is impossible to answer as we have no idea what the Excel data is nor how you want to display it. The first thing you (probably) need to do is to learn how to read your Excel data. Take a look at Microsoft.Office.Interop.Excel[^], and Reading and Writing Excel using OLEDB[^], for some ideas. As to displaying your data, you will need to get the documentation for your device and study that.
 
Share this answer
 
v2
Comments
mohsin_334 11-Jan-13 5:09am    
Hi, thanks for your reply.
I have numeric data in Excel (Running production of machine), now i want to display this data on seven segment or any display made of LEDs.
My question is whether i need to program MCU or there is some tool for this purpose?
Richard MacCutchan 11-Jan-13 5:30am    
Sorry I do not know. As I said above, you need to check the documentation that comes with the device.
A simple solution would be to export the Excel sheet to a CSV file and write a program that reads the CSV file and writes the text content cell by cell to the serial port (e.g. with some delay between cells or lines according to the size of the display).

The same task can be also performed by Excel automation (controlling Excel by other applications) or using a third party Excel library to iterate through the cells.

If you have no idea yet how to connect the display, I suggest to implement it in a simple way where text blocks are send that contain the same number of characters that can be shown by the display. So you can implement scrolling and delays by PC software rather than doing it with the MCU.
 
Share this answer
 
Comments
mohsin_334 11-Jan-13 5:13am    
Hi, thanks for your reply.
I have numeric data in Excel (Running production of machine), now i want to display this data on seven segment or any display made of LEDs.
My question is whether i need to program MCU or there is some tool for this purpose?
Jochen Arndt 11-Jan-13 5:41am    
It depends on your display. You can get displays with various types of hardware interfaces (they already contain some kind of MCU or logic to decode commands and data and drive the elements). Most of these interfaces are typical MCU serial interfaces like SPI, I2C, CAN. But you can also get some with RS-232 interfaces (wouldn't be USB better nowadays?).

If you find one with RS-232 or USB interfaces which matches your needs, you did not need a MCU but must send data according to the interface specification of that display.

If you use a display with another interface you must use a MCU that receives the data on the RS-232 port and forwards to the display interface. The MCU can forward the data as-is (data must be prepared on PC) or put passed text on the display using the display specific commands.

The order is:
1. Select a display
2. Read the display documentation (command set)
3. If necessary use a MCU
4. Write the routines to display the data (PC or MCU)
5. Send data via RS-232 port of PC

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900