Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

excel as database

Posted on 2011-02-24
9
Medium Priority
?
307 Views
Last Modified: 2012-05-11
Hi. I have asked a programmer to try to implement these javascript graphs http://www.highcharts.com.
They would generally access a database like mysql but I have files, csv files, which I want to access. The programmer does not know how to handle that. I think it is possible. Can anyone suggest a strategy for doing this?

Thanks.
0
Comment
Question by:onyourmark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +1
9 Comments
 
LVL 18

Expert Comment

by:Cluskitt
ID: 34970625
That depends on the data in those files and the way they're represented. Also, if they're consistent.
If they're consistent (for example, each line has 5 "fields", separated by a comma, and no field has a comma in it ever, though there are ways to include one as well) all he has to do is load them to a 2 dimensional array. A 2 dimensional array can then be treated in a similar way as a table. You can even send it to a temporary table and work it like that.
0
 

Author Comment

by:onyourmark
ID: 34970664
Can you say how to load it as a 2 dimensional array. I think there is a way to have the graphing application treat it just like it is a database. It used to be to use something like an odbc driver or something like that but I don't know now. The fields are all comma delimited and although it has text the text is quoted.
0
 
LVL 18

Expert Comment

by:Cluskitt
ID: 34970738
There is an odbc driver for text databases, just like there's one for excel files. I'm not sure how they work though, as I've never used them.

Loading a text file into an array is easy: Just open the text file and load one line to a variable. Then break it on each separator (, or ; or whatever it's defined) and assign to the array. Then just loop for all the lines.

You can then use, if you want, an odbc connection to an existing database and dump it into a temp table, or even store it permanently in an existing one. That way, you can work the data with SQL queries, which you couldn't do if you work with just the array.
0
Get your Disaster Recovery as a Service basics

Disaster Recovery as a Service is one go-to solution that revolutionizes DR planning. Implementing DRaaS could be an efficient process, easily accessible to non-DR experts. Learn about monitoring, testing, executing failovers and failbacks to ensure a "healthy" DR environment.

 
LVL 21

Expert Comment

by:silemone
ID: 34970964
You can use an excel table like a database.  Read it, and use it directly.  Exactly why does the programmer think he can't use the excel spread sheet?
0
 
LVL 21

Accepted Solution

by:
silemone earned 2000 total points
ID: 34970989
I.e. you can connect to an excel spreadsheet using a connection string, read each cell, etc., just as you would a db...then pass the needed values...I have doen so before...

here's an example link:
http://www.c-sharpcorner.com/uploadfile/bourisaw/accessexceldb08292005061358am/accessexceldb.aspx
0
 
LVL 21

Expert Comment

by:silemone
ID: 34971008
Here's a second example from the codeproject, a good site for any programmer:
http://www.codeproject.com/KB/grid/Excel_in_CS.aspx

0
 

Author Comment

by:onyourmark
ID: 34971114
Hi. Thank you. They seem like good links.
0
 
LVL 24

Expert Comment

by:Tracy
ID: 35225356
This question has been classified as abandoned and is being closed as part of the Cleanup Program. See my comment at the end of the question for more details.
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you need to forecast numbers -- typically for finance -- the Windows and Mac versions of Excel 2016 have a basket of tools to get the job done.
In today's business world, data is more important than ever for informing marketing campaigns. Accessing and using data, however, may not come naturally to some creative marketing professionals. Here are four tips for adapting to wield data for insi…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

722 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question