ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Determining Excel Formats quickly. (https://www.excelbanter.com/excel-discussion-misc-queries/185867-determining-excel-formats-quickly.html)

cardosol

Determining Excel Formats quickly.
 
Hello,

I have an excel file that is automatically loaded into a database. However,
from time to time, the file rejects due to format errors. I can not tell what
these formatting errors are from just looking at the data. Is there a
function, validation or macro that I can use to ensure the workbook is
formatted correctly before the system picks it up to prevent rejection of the
file?

JLatham

Determining Excel Formats quickly.
 
I doubt that there's a general purpose format validating macro laying around,
just too many possible variations and combinations of formats to address in
such fashion.

Probably your best bet is to either write a custom macro to validate and set
formats the way you need that could be run prior to exporting for use by the
database.

If you're not proficient with VBA coding, the 'easy' way is to sit down
(plan this out or practice a couple of times before starting the real-deal)
and start recording a macro and go through the entire workbook setting the
formats the way they must be for the database to accept them. Then run that
macro prior to exporting the data for use by the database.

If the worksheet names and cell locations needing formatting are always the
same, but may reside in different workbooks, you can record the macro and
direct the macro to be stored in your personal.xls workbook so it can be used
on many different .xls files in the future.

Hope this helps some.

"cardosol" wrote:

Hello,

I have an excel file that is automatically loaded into a database. However,
from time to time, the file rejects due to format errors. I can not tell what
these formatting errors are from just looking at the data. Is there a
function, validation or macro that I can use to ensure the workbook is
formatted correctly before the system picks it up to prevent rejection of the
file?



All times are GMT +1. The time now is 02:26 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com