×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Importing Excel into Crystal (mulitple tabs)

Importing Excel into Crystal (mulitple tabs)

Importing Excel into Crystal (mulitple tabs)

(OP)
I use this function a lot but have always wondered if it's possible to import an excel file with 2 different tabs to make them into 1. I have some data (.xls) that has two tabs. It's continuous data so I would like to bring in the 2nd tab and merge it w/ the 1st tab (like you can do in sql) but whenever I try to bring the 2nd tab in, it creates it like a whole new file and wants to find the joins between the spreadsheets. Is there a way to do this that you know of?

RE: Importing Excel into Crystal (mulitple tabs)

So, after looking up some info about how to create a command to pull from Excel. I created a simple Excel spreadsheet with two tabs and two columns (id and data). After dropping the first tab (Sheet1) into the report. I looked at the SQL query. Copied it. Removed the Sheet1 data from the report. Created a command and pasted the SQL query then did a union to connect my second tab. See example below.

SELECT `Sheet1_`.`id`, `Sheet1_`.`data`
FROM `Sheet1$` `Sheet1_`


union

SELECT `Sheet2_`.`id`, `Sheet2_`.`data`
FROM `Sheet2$` `Sheet2_`

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close