473,385 Members | 1,673 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Convert Spreadsheet Array to MS Access

I frequently have to convert spreadsheet arrays into relational
tables, and was wondering if anyone had a trick for doing so.
Example:

Apr May Jun
Entity 1 10 20 30
Entity 2 15 25 35
Entity 3 18 28 38
Needs to be converted toL

Entity 1, Apr, 10
Entity 1, May, 20
Entity 1, Jun, 30
Entity 2, Apr, 15
Entity 2, May, 25
etc.
etc.
Nov 13 '05 #1
1 1459
When you say "spreadsheet array" are you linking to Excel? If so, you should
be able to write a Union query to give what you want:

Assuming that the fields in the linked Excel table are named Field1, Apr,
May and Jun, your query would be something like:

SELECT Field1, "Apr" As WhatMonth, Apr FROM MyLinkedExcelTable
UNION
SELECT Field1, "May" As WhatMonth, May FROM MyLinkedExcelTable
UNION
SELECT Field1, "Jun" As WhatMonth, Jun FROM MyLinkedExcelTable

--
Doug Steele, Microsoft Access MVP
http://I.Am/DougSteele
(no e-mails, please!)

"Rod MacPherson" <ro*@rodmacpherson.com> wrote in message
news:88**************************@posting.google.c om...
I frequently have to convert spreadsheet arrays into relational
tables, and was wondering if anyone had a trick for doing so.
Example:

Apr May Jun
Entity 1 10 20 30
Entity 2 15 25 35
Entity 3 18 28 38
Needs to be converted toL

Entity 1, Apr, 10
Entity 1, May, 20
Entity 1, Jun, 30
Entity 2, Apr, 15
Entity 2, May, 25
etc.
etc.

Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Phil Powell | last post by:
What would one best recommend to parse an existing Excel spreadsheet (was done in Excel 97 or 2000 not sure to be honest)? I am looking for the most practical way of parsing an existing...
2
by: Fabio | last post by:
Hello, there's a module called Spreadsheet::WriteExcel. It allows me to create a new worksheet and edit its cells: my $workbook = Spreadsheet::WriteExcel->new('my.xls'); my $worksheet =...
5
by: Andrew V. Romero | last post by:
At work we have an excel file that contains the list of medications and their corresponding strengths. I would like to save the excel file as a text list and paste this list into a javascript...
2
by: Bubba | last post by:
I know it's possible, just don't know how to do it. I have a spreadsheet that I imported into access. Two of the columns in the table have Hard Drive space values listed for example 2.45 GB and 453...
2
by: Colleyville Alan | last post by:
I have been working on an application that queries data from Access, loads it into an array, and then writes it to an Excel spreadsheet. I use the array approach to have fine control over spacing,...
3
by: Brooke | last post by:
I am new to ASP.NET, but have been programming for about 14 years (C# about 2 years). My manager asked me to develop a web application that would allow employees to view a spreadsheet that is used...
5
by: TS | last post by:
is there some code somewhere that does this? i have a jagged array that is not jagged, it has an equal number of rows and columns in each array so it should convert but want to get the code to do...
2
by: Ch Pravin | last post by:
Hi All: I am having the following xml which i need to convert to excel using xslt. Please help me out. Afghanistan.xml <?xml version="1.0" encoding="utf-16"?> <Languages...
2
by: franc sutherland | last post by:
Hello everyone, I am using Access 2003. In my database there is a table which is linked to an excel spreadsheet. When I move the mdb file to someone else's computer the spreadsheet will be in...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.