472,352 Members | 1,483 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,352 software developers and data experts.

File format is not valid

Hello,
I am working on an Access database (version 2000) that allows front-end users to enter data into a form. I then created a macro that allows users to send these data to me which appears in my email inbox as an Excel spreadsheet. Even users with Access 2003 have sent me data and used this database succesfully. This has worked great until yesterday.
One of my forms includes 7 subforms, each of which are sent to me as a separate email. When a new user sent me his data yesterday, 5 of the subforms came through ok and with data, but when I attempted to open the other 2 an error message appeared that read, "(file name).xls : file format is not valid." What does this mean?
I know that this user is working on Access 2000.
Any suggestions on how I can fix this problem or at least view the data? I have attempted to save the .xls file to my hard drive and open it using both Excel and Access, but have had no luck. When I use Excel and File>Open, I get the same error message as above. When I use Access and File>Open (in .xls format), I get another error message, "The wizard is unable to access info in the file (name). Please check that the file exists and is in correct format". When I use Access and File>Import, nothing happens.
I am grateful for any assistance.
Thank you
Tchilton
Jan 17 '07 #1
24 5980
MMcCarthy
14,534 Expert Mod 8TB
Hello,
I am working on an Access database (version 2000) that allows front-end users to enter data into a form. I then created a macro that allows users to send these data to me which appears in my email inbox as an Excel spreadsheet. Even users with Access 2003 have sent me data and used this database succesfully. This has worked great until yesterday.
One of my forms includes 7 subforms, each of which are sent to me as a separate email. When a new user sent me his data yesterday, 5 of the subforms came through ok and with data, but when I attempted to open the other 2 an error message appeared that read, "(file name).xls : file format is not valid." What does this mean?
I know that this user is working on Access 2000.
Any suggestions on how I can fix this problem or at least view the data? I have attempted to save the .xls file to my hard drive and open it using both Excel and Access, but have had no luck. When I use Excel and File>Open, I get the same error message as above. When I use Access and File>Open (in .xls format), I get another error message, "The wizard is unable to access info in the file (name). Please check that the file exists and is in correct format". When I use Access and File>Import, nothing happens.
I am grateful for any assistance.
Thank you
Tchilton
Is there any characters in the filename that would confuse excel/access. Try renaming the file to something like temp.xls and see if it will open OK.

If that doesn't work try changing (a copy of the file) the extension to csv and see if it will open alright. Unless there is some reason not to do so you may want to look at getting all the file extensions to csv rather than xls as this will avoid problems in the future. This will require some code changes as csv is a text file and the code is different.

Mary
Jan 18 '07 #2
NeoPa
32,511 Expert Mod 16PB
I can't think of anything from what you've told us.
Have you checked that these are repeatable? Does the same user create files with similar problems consistently? I assume that there are files there, although unrecognised as Excel files?
Jan 18 '07 #3
I can't think of anything from what you've told us.
Have you checked that these are repeatable? Does the same user create files with similar problems consistently? I assume that there are files there, although unrecognised as Excel files?

Hi,
Yes - it is odd! The file names are unique. This is the only user that has had problems like this, all 3 times he's tried to send the forms. All subforms appear and 5 of them open w/ all data, but the last 2 wont open and give me the above error message (r.e. file formats...).
Jan 22 '07 #4
Is there any characters in the filename that would confuse excel/access. Try renaming the file to something like temp.xls and see if it will open OK.

If that doesn't work try changing (a copy of the file) the extension to csv and see if it will open alright. Unless there is some reason not to do so you may want to look at getting all the file extensions to csv rather than xls as this will avoid problems in the future. This will require some code changes as csv is a text file and the code is different.

Mary
Hi,
Thanks for replying so fast! I still need some help. I tried your suggestions above, but get the same error message ("file format is not valid") ... I am probably relatively new to Access; why do you suggest .csv extensions?
Jan 22 '07 #5
MMcCarthy
14,534 Expert Mod 8TB
Hi,
Thanks for replying so fast! I still need some help. I tried your suggestions above, but get the same error message ("file format is not valid") ... I am probably relatively new to Access; why do you suggest .csv extensions?
.csv will allow you to open the files using excel and save them as an excel file if you wish. However, saving them as .csv files will remove any formatting problems which may be currently causing the file not to open. It may also allow you to identify those problems.

Any .csv file will be opened by excel as if it is an excel file with headers and values in the normal columns.

Mary
Jan 22 '07 #6
NeoPa
32,511 Expert Mod 16PB
Hi,
Yes - it is odd! The file names are unique. This is the only user that has had problems like this, all 3 times he's tried to send the forms. All subforms appear and 5 of them open w/ all data, but the last 2 wont open and give me the above error message (r.e. file formats...).
Have you considered that this may be a problem with the individual's PC rather than Access or your database.
Otherwise, what I was trying to say is that we have too little information from you to give informed answers.
What are the names of the files that work / don't work?
Do they differ between PCs?
It's hard even to suggest the questions without being there. If you see anything different between the working ones and the non-working one then it could be relevant.
Jan 22 '07 #7
Have you considered that this may be a problem with the individual's PC rather than Access or your database.
Otherwise, what I was trying to say is that we have too little information from you to give informed answers.
What are the names of the files that work / don't work?
Do they differ between PCs?
It's hard even to suggest the questions without being there. If you see anything different between the working ones and the non-working one then it could be relevant.

Nope - no differences in file names (or macros) between users.... all users have exactly the same file. Thanks for trying anyway... i will try Mary's advice and change the macro to convert from Access to a .csv file (rather than Excel).
Jan 23 '07 #8
NeoPa
32,511 Expert Mod 16PB
Good luck with that. I hope you resolve your issues.
Jan 23 '07 #9
.csv will allow you to open the files using excel and save them as an excel file if you wish. However, saving them as .csv files will remove any formatting problems which may be currently causing the file not to open. It may also allow you to identify those problems.

Any .csv file will be opened by excel as if it is an excel file with headers and values in the normal columns.

Mary
OK - thanks.
In looking at my options, it appears that i don't have .csv as an option to rename my macros. The only options I have for output formats are: .rtf, txt, htx or idc, xls, htm or html, and .asp. Would any of those work similarly to the.csv extension?
I have been messing with this issue some more. I failed to mention that I change a number of menu items prior to users using the database. In Tools>Startup, I UNcheck Allow Full Menus, Allow Default Shortcut Menus, Display Database Window, Allow Built-in Toolbars, and Allow Toolbar/Menu Changes. It appears that the files come through (and include their data) as long as I don't change anything in the Tools>Startup. Once I make those changes, all files but the same two come through ok now. Remember that this has worked for all other users - until this one user.
Jan 23 '07 #10
MMcCarthy
14,534 Expert Mod 8TB
OK - thanks.
In looking at my options, it appears that i don't have .csv as an option to rename my macros. The only options I have for output formats are: .rtf, txt, htx or idc, xls, htm or html, and .asp. Would any of those work similarly to the.csv extension?
I have been messing with this issue some more. I failed to mention that I change a number of menu items prior to users using the database. In Tools>Startup, I UNcheck Allow Full Menus, Allow Default Shortcut Menus, Display Database Window, Allow Built-in Toolbars, and Allow Toolbar/Menu Changes. It appears that the files come through (and include their data) as long as I don't change anything in the Tools>Startup. Once I make those changes, all files but the same two come through ok now. Remember that this has worked for all other users - until this one user.
I haven't used macros in years. You can use .txt as long as the file comes out with commas separating the fields. The file extention can then just be changed to .csv (csv is just a text file with values separated by commas - Comma Separated Value file)
Jan 23 '07 #11
OK - thanks.
In looking at my options, it appears that i don't have .csv as an option to rename my macros. The only options I have for output formats are: .rtf, txt, htx or idc, xls, htm or html, and .asp. Would any of those work similarly to the.csv extension?
I have been messing with this issue some more. I failed to mention that I change a number of menu items prior to users using the database. In Tools>Startup, I UNcheck Allow Full Menus, Allow Default Shortcut Menus, Display Database Window, Allow Built-in Toolbars, and Allow Toolbar/Menu Changes. It appears that the files come through (and include their data) as long as I don't change anything in the Tools>Startup. Once I make those changes, all files but the same two come through ok now. Remember that this has worked for all other users - until this one user.
Could it be that messing with the Startup menus (in Tools) is affecting the reading of this one file (even though I can read the other files in this group)?
Jan 24 '07 #12
MMcCarthy
14,534 Expert Mod 8TB
Could it be that messing with the Startup menus (in Tools) is affecting the reading of this one file (even though I can read the other files in this group)?
All the startup menu does is set the availability of menus, windows and shortcut keys.
Jan 24 '07 #13
MMcCarthy
14,534 Expert Mod 8TB
If you open one of the files as a csv that won't open as an excel file, you can check for illegal characters, etc. See if anything seems out of place or not showing proper values.
Jan 24 '07 #14
If you open one of the files as a csv that won't open as an excel file, you can check for illegal characters, etc. See if anything seems out of place or not showing proper values.
I just tried to open the xls files (those that wont open) as csv. First I re-saved the xls file as a csv file, then tried to open. In so doing, I get the same error message and no data appears... any thoughts?
Jan 24 '07 #15
All the startup menu does is set the availability of menus, windows and shortcut keys.
I understand that, but it seems odd to me that the 2 files come through (AND include their data) as long as I don't change anything in the Tools>Startup. Once I make those changes to the menus, those 2 files don't show data. Why would it work w/o the menu changes, but not work once I change the menus at startup? Funny!
Jan 24 '07 #16
MMcCarthy
14,534 Expert Mod 8TB
I just tried to open the xls files (those that wont open) as csv. First I re-saved the xls file as a csv file, then tried to open. In so doing, I get the same error message and no data appears... any thoughts?
Close Excel and open the file with Notepad. See what's going on.
Jan 24 '07 #17
Close Excel and open the file with Notepad. See what's going on.
Bummer - there are no recognizable fields or data in the file when opened w/ Notepad . Only a bunch of 0's, some wierd characters (ÐÏࡱá >  þÿ     þÿÿÿ þÿÿÿ ), and the words, "Root Entry".
Jan 24 '07 #18
MMcCarthy
14,534 Expert Mod 8TB
Bummer - there are no recognizable fields or data in the file when opened w/ Notepad . Only a bunch of 0's, some wierd characters (ÐÏࡱá >  þÿ     þÿÿÿ þÿÿÿ ), and the words, "Root Entry".
OK, there is something very strange going on. I'm afraid you may be dealing with corruption here but let's not jump the gun.

Go back to one of the two queries outputting by these files. Are they query objects that you can open in the database? If so then open one of them and if it opens fine then try using the File --> Export to export the data and save first as xls file and then as csv file.
Jan 24 '07 #19
NeoPa
32,511 Expert Mod 16PB
Bummer - there are no recognizable fields or data in the file when opened w/ Notepad . Only a bunch of 0's, some wierd characters (ÐÏࡱá >  þÿ     þÿÿÿ þÿÿÿ ), and the words, "Root Entry".
Is this the CSV file? and did you set the options to save in CSV format or just change the File Extension?
Jan 24 '07 #20
MMcCarthy
14,534 Expert Mod 8TB
Is this the CSV file? and did you set the options to save in CSV format or just change the File Extension?
Poster can't do a save as because file won't open. However, changing the file extention to csv on exported data shouldn't be causing this problem.
Jan 24 '07 #21
OK, there is something very strange going on. I'm afraid you may be dealing with corruption here but let's not jump the gun.

Go back to one of the two queries outputting by these files. Are they query objects that you can open in the database? If so then open one of them and if it opens fine then try using the File --> Export to export the data and save first as xls file and then as csv file.
I can open the data in the database, both before and after I change the Startup menus. But once I change the Startup menus (as w/ the database this paticular "problem" user uses), I can't use the File>Export because I deleted that option when I changed the Startup menus...
Jan 24 '07 #22
MMcCarthy
14,534 Expert Mod 8TB
I can open the data in the database, both before and after I change the Startup menus. But once I change the Startup menus (as w/ the database this paticular "problem" user uses), I can't use the File>Export because I deleted that option when I changed the Startup menus...
Add File Export to the custom menu and see if that solves your problem. As I said I haven't used macros in years and if the macro is trying to use a menu command that isn't present on the custom menu this could be the problem.
Jan 24 '07 #23
I think I discovered the problem!!! It appears that Excel didnt like the fact that (only) one field name in the "problem" table had a space in the name. The only thing that worked was changing this field name to a single word (no spaces); now all fields AND data appear in that table when it is emailed to me....
Just wanted to give you the good news! And again, THANK YOU for all of your assistance!
Jan 30 '07 #24
NeoPa
32,511 Expert Mod 16PB
Thank YOU.
It's great when members post the solution or resolution to their problems.
  1. We can stop answering :)
  2. People searching will find a solution rather than just a question :)
Jan 30 '07 #25

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: John Ratliff | last post by:
What is the best way to determine a file's size? Should I use stat? Is this a better way? std::fstream file("myfile", std::ios_base::in |...
9
by: Arnold | last post by:
I need to read a binary file and store it into a buffer in memory (system has large amount of RAM, 2GB+) then pass it to a function. The function...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not...
1
by: Roy | last post by:
Hi, I have a problem that I have been working with for a while. I need to be able from server side (asp.net) to detect that the file i'm...
3
by: tigrrgrr42 | last post by:
I am working(vb.net03and05) with word documents stored in a sql db and I am currently bringing them from a byte array into a temp file to pop into...
1
by: laredotornado | last post by:
Hi, I'm using PHP 4.4.4 on Apache 2 on Fedora Core 5. PHP was installed using Apache's apxs and the php library was installed to...
7
by: christian.eickhoff | last post by:
Hi Everyone, I am currently implementing an XercesDOMParser to parse an XML file and to validate this file against its XSD Schema file which are...
14
by: MsNews | last post by:
Hi, I'm creating a free Icon library in C# with source code include, it already support .ico/.dll../exe and I'd like to support .ICL format too,...
1
by: Kemmylinns12 | last post by:
Blockchain technology has emerged as a transformative force in the business world, offering unprecedented opportunities for innovation and...
0
jalbright99669
by: jalbright99669 | last post by:
Am having a bit of a time with URL Rewrite. I need to incorporate http to https redirect with a reverse proxy. I have the URL Rewrite rules made...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
Oralloy
by: Oralloy | last post by:
Hello Folks, I am trying to hook up a CPU which I designed using SystemC to I/O pins on an FPGA. My problem (spelled failure) is with the...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....
0
by: Rahul1995seven | last post by:
Introduction: In the realm of programming languages, Python has emerged as a powerhouse. With its simplicity, versatility, and robustness, Python...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.