.comment-link {margin-left:.6em;}
Marc Boizeau's blog
Friday, December 17, 2004
  Change all querytable in an Excel File
A quick way to change, for instance, the name of a table in each query of a file:

Dim q As QueryTableDim ws As Worksheet
For Each ws In ActiveWorkbook.Worksheets

For Each q In ws.QueryTables
q.CommandText = Replace(q.CommandText,"MaChaine", "MaNouvelleChaine")
Next
Next

Of course dont forget to deeply test the result!

Thanks to "ADE" on microsoft.public.fr.officexp who ask the question.

That's all folks!

 
Comments: Post a Comment

Links to this post:

Create a Link



<< Home
You are a developer and work with Oracle and Microsoft technologies? Have a look!
ATOM
How to:
Use updatable views in Access
Get data in Excel from Oracle 1
Get data in Excel from Oracle 2
Draw the Mandelbrot set using C#
Use the "Grouping Sets" SQl Syntax
Use the "Rollup" SQl Syntax
Use the "Rank over" SQl Syntax

My Wiki contributions
WIKIWIKI
Connect a .Net application to an Oracle Database 1...
Mandelbrot in C# , the sources!
Mandelbrot in C#
SQL Analytical : Rollup
Just another link today
A few Oracle and Microsoft links
Strange and usefull Oracle SQL structure
From the datawarehouse to the chart (part 2)
ARCHIVES
October 2004 / November 2004 / December 2004 / January 2005 / February 2005 / March 2005 / April 2005 / June 2005 / July 2005 / August 2005 / September 2005 / December 2005 / February 2006 / December 2006 / March 2009 /


Powered by Blogger

mboizeau.free.fr