Solved

Excel VBA/VB.net and Excel Tables (SQL Table data)

Posted on 2013-01-07
3
312 Views
Last Modified: 2013-01-07
Hi

I don't really use tables in Excel. Are they useful at all for viewing and updating SQL table data/
At the moment I either import SQL data or view it in a DataGridView form in Excel VB.net.
Are there any benefits of using Excel tables to do this
0
Comment
Question by:murbro
3 Comments
 
LVL 14

Assisted Solution

by:Faustulus
Faustulus earned 250 total points
ID: 38750378
Neither do I. To my understanding tables are more in the nature named ranges. So, if you have several tables on one worksheet you can address them by their name and let each one have a cell referenced as Cells(1, 1). Each table has its own number of rows and columns and that makes it easier to add to it horizontally or vertically - a matter to addressing.
On the other hand, each cell within a table is also a cell within a worksheet. Whether you refer to it as Tables1.Cells(1, 1) or Cells(485, 15) should be a matter of personal preference. I can imagine that when you paste SQL tables to worksheets you are unlikely to place several of them on the same tab. In that case the question of using tables doesn't appear to come up at all.
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 250 total points
ID: 38750690
If you have a query linked to a SQL server, you're going to end up with a table.

In terms of just viewing data, it doesn't make a lot of difference (other than you natively get autofilters in place) but if you want to add calculated fields etc, tables are very useful.

For updating, it shouldn't make any difference as Faustulus said, other than it's simple to get the extent of your data if it's in a table.
0
 

Author Closing Comment

by:murbro
ID: 38750746
thanks very much
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Convert between Excel file formats (.XLS, .XLSX, .XLSM) with/without macro option David Miller (dlmille) Intro Over this past Fall, I've had the opportunity to see several similar requests and have developed a couple related solutions associate…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use a discrete random variable to simulate the return on an investment over a period of years, create a Monte Carlo simulation using the discrete random variable, and create a graph to represent the possible returns over…
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

920 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now