C
Clinton M James
Hi All,
I recently changed some code of mine to perform an SQL query against a
database and dump the results into a worksheet.
I had a macro that went through each column and counted how many rows were
in each column, and any column that had no data was deleted (Count of 1)
I previously used the pre-2007 code to dump data which worked great but now
with the 2007 version of the code, it appears the data is treated as a pivot
table and because of this, each colymn has the same amount of used rows,
even though the cells are blank. Based on this, my macro to delete unused
columns doesn't detect any columns to delete.
I had to change the code for doing the sql because the old code didn't like
some of the SQL i used, even though it was valid SQL and worked in its
native environment. The new code sees the SQL work, but now I have this
issue of data being treated as if its in a table rather than a series of
individual data elements.
Is anybody aware of a different way to do a data dump that doesn't produce a
pivottable or know of a way to reset the page so the data remains but any
table is removed - it appears that it isn't a pivot table in the proper
sense even though if you delete data it refers to it as a pivottable.
I extend a thank you in advance for any assistance.
Regards,
Clint
I recently changed some code of mine to perform an SQL query against a
database and dump the results into a worksheet.
I had a macro that went through each column and counted how many rows were
in each column, and any column that had no data was deleted (Count of 1)
I previously used the pre-2007 code to dump data which worked great but now
with the 2007 version of the code, it appears the data is treated as a pivot
table and because of this, each colymn has the same amount of used rows,
even though the cells are blank. Based on this, my macro to delete unused
columns doesn't detect any columns to delete.
I had to change the code for doing the sql because the old code didn't like
some of the SQL i used, even though it was valid SQL and worked in its
native environment. The new code sees the SQL work, but now I have this
issue of data being treated as if its in a table rather than a series of
individual data elements.
Is anybody aware of a different way to do a data dump that doesn't produce a
pivottable or know of a way to reset the page so the data remains but any
table is removed - it appears that it isn't a pivot table in the proper
sense even though if you delete data it refers to it as a pivottable.
I extend a thank you in advance for any assistance.
Regards,
Clint