Editing SME and Excel - Extracting Data in Meaningful ways

Jump to navigation Jump to search

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.

Latest revision Your text
Line 17: Line 17:
 
#    Print out to excel
 
#    Print out to excel
  
 +
 +
  
 
<h3>Connect Excel directly to SQL Server</h3>
 
<h3>Connect Excel directly to SQL Server</h3>
Line 22: Line 24:
 
This is the most powerful and flexible way to utilize SME with excel, however takes a bit more effort to setup.
 
This is the most powerful and flexible way to utilize SME with excel, however takes a bit more effort to setup.
  
* Open Excel
+
Excel 2007 onward now has capability to connect directly to SQL Server.  Follow these steps
* Go to the ‘Data’ tab
+
#        Open Excel 2007 or 2010
* ‘From Other Sources’
+
#        Select Data tab
* From Microsoft Query
+
#        Select From Other Sources and select "From SQL Server"
<br>[[File:Excel1.png]]<br>
+
#        Enter your SQL Server instance name  ( see step 5 onward below)
* Choose your Data Source (Contact High5 Software if you need assistance setting up your ODBC connection).
+
#        Select your SQL database
<br>[[File:Excel2.png]]<br>
+
#        Then you will be provided with a list of SME tables to select
* Click on the data source and click ok
+
##              For Excel 2003:  Select +New SQL Server Connection.odc
* You will be asked to log in. Put in your SQL password or contact High5 to set one up.
+
## [[File:ExcelConnect5.png]]
<br>[[File:Excel3.png]]<br>
+
# Enter the Server Name and select Next
* Set the options, uncheck all except Tables, set the Owner to ‘dbo’ as it makes finding the tables easier and then choose your columns.
+
## [[File:ExcelConnect6.png]]
<br>[[File:Excel4.png]]<br>
+
# Select Database and table and select next
* I recommend locating the table you are looking for and adding only one column, then editing the query in MS Query and adding the remainder.
+
## [[File:ExcelConnect7.png]]
<br>[[File:Excel5.png]]<br>
+
# Provide a file name, description and search terms and select Finish
* Click ‘Next’ and pick a sort field. It’s better to wait until you edit the query.
+
## [[File:ExcelConnect8.png]]
<br>[[File:Excel6.png]]<br>
+
# Select a location for the data
* Filter Data - It’s better to wait until you edit the query.
+
# You can also edit the query for the data
<br>[[File:Excel7.png]]<br>
+
## [[File:ExcelConnect9.png]]
* Click ‘View data or edit query in Microsoft Query
+
# Note: Without editing the query, it will bring in the entire table. Most likely you will only want to bring in specific data
<br>[[File:Excel8.png]]<br>
+
# Example: Pull in Customer name, city, state, Contact and email:
* The Query Editor opens
+
## [[File:ExcelConnectA.png]]
* First step – turn off Auto Query or the query will attempt on every change.
+
#This requires knowledge of SQL.
<br>[[File:Excel9.png]]<br>
+
<br>[[File:ExcelConnectB.png]]
* Set your filter criteria:
+
#    More complex SQL queries can be performed, please contact your local sql expert.
<br>[[File:Excel10.png]]<br>
 
* Add fields
 
<br>[[File:Excel11.png]]<br>
 
* Sorting
 
<br>[[File:Excel12.png]]<br>
 
* Return the data to Excel
 
<br>[[File:Excel13.png]]<br>
 
* Pick the row/column for your data.
 
<br>[[File:Excel14.png]]<br>
 
* Returned Data
 
<br>[[File:Excel15.png]]<br>
 
* To edit the query:
 
* Right click in the query and select Table> Edit Query from the menu.
 
<br>[[File:Excel16.png]]<br>
 
  
 
<h3>Outputting search grids to excel</h3>
 
<h3>Outputting search grids to excel</h3>

Please note that all contributions to High5Wiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see High5Wiki:Copyrights for details). Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)