Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default vlookup to a table on a website

I have a detailed table used for vlookup in my spreadsheet.

Trouble is, the table is too big and makes the spreadsheet very large.

Is there anyway to use vlookup to access the same data on a webpage i create
to store the large table? It would reduce the size of my spreadsheet by 50%

Thanks,

Roger
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default vlookup to a table on a website

Unless you need web access for other reasons that seems an awkward solution
to me.
If the workbook size really is a problem then I would put the data in a text
file or maybe a database like SQLite.

RBS

"Roger on Excel" wrote in message
...
I have a detailed table used for vlookup in my spreadsheet.

Trouble is, the table is too big and makes the spreadsheet very large.

Is there anyway to use vlookup to access the same data on a webpage i
create
to store the large table? It would reduce the size of my spreadsheet by
50%

Thanks,

Roger


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default vlookup to a table on a website

Here a most basic example to show how easy it is to do this with SQL on text
files.
The text file in this example is like this:

"Part_Number", "Part_Description"
1,"wheelnut"
2,"doormat"
3,"seatnut"
4,"lightnut"

So, this is the plain text file: C:\TextTables\Parts.txt

Sub TestLateBinding()

Dim rs As Object
Dim TextConn As String
Dim strSQL As String

TextConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
"C:\TextTables\;" & _
"Extended Properties=Text;"

strSQL = "SELECT PART_NUMBER FROM PARTS.TXT WHERE " & _
"PART_DESCRIPTION LIKE '%nut'"

Set rs = CreateObject("ADODB.Recordset")

rs.Open Source:=strSQL, _
ActiveConnection:=TextConn, _
CursorType:=0, _
LockType:=1, _
Options:=1

Cells(1).CopyFromRecordset rs

rs.Close
Set rs = Nothing

End Sub


If you use early binding so with a reference to ADO 2.x then the could can
be like this:

Sub TestEarlyBinding()

Dim rs As ADODB.Recordset
Dim TextConn As String
Dim strSQL As String

TextConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
"C:\TextTables\;" & _
"Extended Properties=Text;"

strSQL = "SELECT PART_NUMBER FROM PARTS.TXT WHERE " & _
"PART_DESCRIPTION LIKE '%nut'"

Set rs = New ADODB.Recordset

rs.Open Source:=strSQL, _
ActiveConnection:=TextConn, _
CursorType:=adOpenForwardOnly, _
LockType:=adLockReadOnly, _
Options:=adCmdText

Cells(1).CopyFromRecordset rs

rs.Close
Set rs = Nothing

End Sub


It has no error handling and you may need to add some more code, but this
will give you the idea.


RBS



"RB Smissaert" wrote in message
...
Unless you need web access for other reasons that seems an awkward
solution to me.
If the workbook size really is a problem then I would put the data in a
text file or maybe a database like SQLite.

RBS

"Roger on Excel" wrote in message
...
I have a detailed table used for vlookup in my spreadsheet.

Trouble is, the table is too big and makes the spreadsheet very large.

Is there anyway to use vlookup to access the same data on a webpage i
create
to store the large table? It would reduce the size of my spreadsheet by
50%

Thanks,

Roger



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 249
Default vlookup to a table on a website

Thanks for the advice.

This is a little advanced for me - i was hoping to be able to upload my
table to the web and use a web query option to access the data.

I guess its a little more complicated.

I really dont want to have a subsidiary file that needs to be locally
present - ive had enough problems with linked files to be put off by this.

Thanks for your advice

Best regards,

Roger

"RB Smissaert" wrote:

Here a most basic example to show how easy it is to do this with SQL on text
files.
The text file in this example is like this:

"Part_Number", "Part_Description"
1,"wheelnut"
2,"doormat"
3,"seatnut"
4,"lightnut"

So, this is the plain text file: C:\TextTables\Parts.txt

Sub TestLateBinding()

Dim rs As Object
Dim TextConn As String
Dim strSQL As String

TextConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
"C:\TextTables\;" & _
"Extended Properties=Text;"

strSQL = "SELECT PART_NUMBER FROM PARTS.TXT WHERE " & _
"PART_DESCRIPTION LIKE '%nut'"

Set rs = CreateObject("ADODB.Recordset")

rs.Open Source:=strSQL, _
ActiveConnection:=TextConn, _
CursorType:=0, _
LockType:=1, _
Options:=1

Cells(1).CopyFromRecordset rs

rs.Close
Set rs = Nothing

End Sub


If you use early binding so with a reference to ADO 2.x then the could can
be like this:

Sub TestEarlyBinding()

Dim rs As ADODB.Recordset
Dim TextConn As String
Dim strSQL As String

TextConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
"C:\TextTables\;" & _
"Extended Properties=Text;"

strSQL = "SELECT PART_NUMBER FROM PARTS.TXT WHERE " & _
"PART_DESCRIPTION LIKE '%nut'"

Set rs = New ADODB.Recordset

rs.Open Source:=strSQL, _
ActiveConnection:=TextConn, _
CursorType:=adOpenForwardOnly, _
LockType:=adLockReadOnly, _
Options:=adCmdText

Cells(1).CopyFromRecordset rs

rs.Close
Set rs = Nothing

End Sub


It has no error handling and you may need to add some more code, but this
will give you the idea.


RBS



"RB Smissaert" wrote in message
...
Unless you need web access for other reasons that seems an awkward
solution to me.
If the workbook size really is a problem then I would put the data in a
text file or maybe a database like SQLite.

RBS

"Roger on Excel" wrote in message
...
I have a detailed table used for vlookup in my spreadsheet.

Trouble is, the table is too big and makes the spreadsheet very large.

Is there anyway to use vlookup to access the same data on a webpage i
create
to store the large table? It would reduce the size of my spreadsheet by
50%

Thanks,

Roger




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,452
Default vlookup to a table on a website

Unless the data needs to be updated often (by yourself?) I would think a
local text file is a lot simpler.
Maybe you have to explain what exactly you are dealing with.

RBS


"Roger on Excel" wrote in message
...
Thanks for the advice.

This is a little advanced for me - i was hoping to be able to upload my
table to the web and use a web query option to access the data.

I guess its a little more complicated.

I really dont want to have a subsidiary file that needs to be locally
present - ive had enough problems with linked files to be put off by this.

Thanks for your advice

Best regards,

Roger

"RB Smissaert" wrote:

Here a most basic example to show how easy it is to do this with SQL on
text
files.
The text file in this example is like this:

"Part_Number", "Part_Description"
1,"wheelnut"
2,"doormat"
3,"seatnut"
4,"lightnut"

So, this is the plain text file: C:\TextTables\Parts.txt

Sub TestLateBinding()

Dim rs As Object
Dim TextConn As String
Dim strSQL As String

TextConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
"C:\TextTables\;" & _
"Extended Properties=Text;"

strSQL = "SELECT PART_NUMBER FROM PARTS.TXT WHERE " & _
"PART_DESCRIPTION LIKE '%nut'"

Set rs = CreateObject("ADODB.Recordset")

rs.Open Source:=strSQL, _
ActiveConnection:=TextConn, _
CursorType:=0, _
LockType:=1, _
Options:=1

Cells(1).CopyFromRecordset rs

rs.Close
Set rs = Nothing

End Sub


If you use early binding so with a reference to ADO 2.x then the could
can
be like this:

Sub TestEarlyBinding()

Dim rs As ADODB.Recordset
Dim TextConn As String
Dim strSQL As String

TextConn = "Provider=Microsoft.Jet.OLEDB.4.0;" & _
"Data Source=" & _
"C:\TextTables\;" & _
"Extended Properties=Text;"

strSQL = "SELECT PART_NUMBER FROM PARTS.TXT WHERE " & _
"PART_DESCRIPTION LIKE '%nut'"

Set rs = New ADODB.Recordset

rs.Open Source:=strSQL, _
ActiveConnection:=TextConn, _
CursorType:=adOpenForwardOnly, _
LockType:=adLockReadOnly, _
Options:=adCmdText

Cells(1).CopyFromRecordset rs

rs.Close
Set rs = Nothing

End Sub


It has no error handling and you may need to add some more code, but this
will give you the idea.


RBS



"RB Smissaert" wrote in message
...
Unless you need web access for other reasons that seems an awkward
solution to me.
If the workbook size really is a problem then I would put the data in a
text file or maybe a database like SQLite.

RBS

"Roger on Excel" wrote in
message
...
I have a detailed table used for vlookup in my spreadsheet.

Trouble is, the table is too big and makes the spreadsheet very large.

Is there anyway to use vlookup to access the same data on a webpage i
create
to store the large table? It would reduce the size of my spreadsheet
by
50%

Thanks,

Roger




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Vlookup Table - with L/U value as '100 JMay Excel Discussion (Misc queries) 2 April 1st 09 04:32 PM
Vlookup table Joe Excel Discussion (Misc queries) 3 January 23rd 08 07:32 PM
inporting data from website where website address frequently chang HP Excel Programming 3 June 24th 07 03:50 PM
How to link a daily updated table data on website to Excel? heatwave Excel Worksheet Functions 0 August 8th 05 01:50 PM
Vlookup info being used without vlookup table attached? Excel Worksheet Functions 0 January 25th 05 10:43 AM


All times are GMT +1. The time now is 04:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"