Go Down

Topic: Retrieve value from spesific cell in excel..?? (Read 12168 times) previous topic - next topic

Nick_Pyner

If it did, it is barely relevant. Nobody talked about O/Ss much. You programmed it in 6502 machine code, or used the excellent Basic included, which is what you would typically do to manipulate serial files, and my statement is 101% valid. I no longer have my C64. I hardly played any games but they were such a good games machine I sold it for more than I thought I would in about 1992   

raschemmel

#16
Apr 23, 2014, 02:18 am Last Edit: Apr 23, 2014, 02:31 am by raschemmel Reason: 1
Quote
I'm sure it is a case of "must" rather than "may want to" or at least it's the most sensible way. This is easy enough to do on a Commodore 64 and it can't be harder on an Arduino.  All you need is the shape of the array and the location of the cell in question.  

If you're referring to this statement then I think I was agreeing with you when I said this:
Quote
the Excel file in question could be converted to CSV prior to the using the arduino to extract the information. At least it doesn't sound as far fetched as the OP's question (that being extract the data from an Excel (non-CSV file).  

mrburnette


how I want to read the value from the specific cell in excel?
I was plan to scan the barcode and send the bar ID into specific excel cell inside the SD card. For example...the ID show in cell F5.  Then at cell F6 will show the S/N for that ID (using excel formula). I want the arduino to read the S/N inside cell (F6) and print out at LCD..
*i ve the list all barcode ID in comlumn A and S/N at column B
I ve try to search every where in internet and still not found the solution my problem.


Yes, this can be done in realtime which is what I believe you want.  Excel is a rather complex program but the solution lies in VBA, the programming language of Excel.  F6 is a formula that has a visual representation that is shown on the monitor via a buffer.  So, VBA can be used to map F6 to another cell that can be used to actually have the digits.  This can then be exported as a range to a disk file OR can be sent oner serial to the Arduino or even directly to a serial display.
The concepts are advanced and the implementation is Expert.
http://www.taltech.com/support/entry/sending_dde_commands_from_excel

Ray

raschemmel

Quote
The concepts are advanced and the implementation is Expert.

That explains why I don't understand any of it... XD

mrburnette

Quote
http://www.taltech.com/support/entry/sending_dde_commands_from_excel


Nothing wrong with that.  VBA beyond simple macros is a skill centric only to Microsoft Office fanboys (and fangirls.)  But, when one is working with Office, VBA is pure magic.

Ray

Nick_Pyner


Quote
The concepts are advanced and the implementation is Expert.

That explains why I don't understand any of it... XD


You surely don't need to. I submit that blissful ignorance in this arena is a wise defense measure. Any knowledge here might prompt you do something silly - like use it.

raschemmel

Don't get me wrong, I can totally get behind macros. I used to use them a long time ago. It was so long ago I don't even remember the software that had them but I remember I had probably about 10 or twenty macros I used on a regular basis and they made things much more efficient. I don't use Office much so I probably don't need it but if I did I would use. I have no problem learning macros. I just don't know anything about VBA. I'm sure it's great product for those who need it. I first started using macros back in the dos days when I batch files for everything. That might have been before Windows came along.

Nick_Pyner

That's fine but I think it's time review the original post which would imply that, not only would you need to know VBA, but also you need to teach Arduino VBA, so it can do the looking. And likely all for no purpose - or no purpose that can't be done with a CSV. I've heard it said that 99% of all the real work ever done in Excel can be done with a CSV file. I'm inclined to believe it. 

jbarchuk

#23
Apr 23, 2014, 08:21 am Last Edit: Apr 23, 2014, 10:27 pm by jbarchuk Reason: 1
... - or no purpose that can't be done with a CSV. I've heard it said that 99% of all the real work ever done in Excel can be done with a CSV file. I'm inclined to believe it.  


There's nothing necessarily wrong with that. It's easy, well documented, millions of users for support and books full of cookbook solutions. It's the thought that the One True Path is the only way to go that's not good. There are almost always options. Similarly, there's not much that Photoshop can do that netpbm can't do for free. And for video not much that SUPER(C) can't do (via netpbm.) But *SCRIPTING* isn't commonly taught anywhere, only how to operate the commercial stuff. Point-click-ctrl-z-point-click is much easier than thinking a task through. And all the friggin -parameters- of the command line stuff -is- harder to remember than flipping through a few menus.

If it weren't for Bill and the Cohort of Control we'd all still be using DOS 3.2 and 80286 @ 20THz.

EDIT typo DELETE wrong information. How about an Arduino-CVSCSV library... hmmm..... There's got to be a CVS CSV API that can be adapted. Any of you nerds out there interested in trying this? So the image and database people have something to work with? link deleted


mrburnette


That's fine but I think it's time review the original post which would imply that, not only would you need to know VBA, but also you need to teach Arduino VBA, so it can do the looking. And likely all for no purpose - or no purpose that can't be done with a CSV. I've heard it said that 99% of all the real work ever done in Excel can be done with a CSV file. I'm inclined to believe it. 


I reread the original post.  I believe the Op wants the Excel up and running continuously and the "Value" shown in the cell to be redisplayed onto a LCD screen.  I cannot determine from the post if the Arduino really needs to know the value for any use other than sending to the LCD.  So, the procedure would be for VBA to send to Arduino... over serial through the USB port is likely the most viable, although two-way can be established over USB with the right descriptors... perhaps to a Leonardo.

If we could coax Excel into producing a single ASCII file for the Arduino, we would still need to manage the opening of the file and the access to the file data contents.  This just seems silly.

Reading a file stream and extracting info is really very, very easy.  The character stream coming from reading an SD card is no different, in theory, than the stream coming from a keyboard.  I have posted last year a simple example of how to parse and manipulate such a stream (Somewhere in the Project Gallery) but also here:
http://www.hackster.io/rayburne/scientific-calculator

Presumably, the Op's Spreadsheet has a lookup table for UPC being read by the barcode reader.  Such tables are likely not appropriate for an Arduino even if we put in additional EEPROM.  Then there is probably a price table and tax calculations (assuming a commercial terminal... but it is really not relevant what is being stored and looked-up.)  I think the Arduino is just managing the LCD, but the Op probably should confirm that belief.

Ray

jbarchuk


Go Up