File Format Or File Extension Not Valid
Sep 20, 2013
I saved my worksheet in vba .xlsx and for some reason, when I go to the folder that it's saved in and try to open the file I get an error message saying "excel cannot open the file 'PO Acks fo 09-20-2013.xlsx' because the file format or file extension is not valid. Verify that the file has not been corrupted and that the file extension matches the format of the file"
This is weird because I have another file that I save right before this that opens just fine without an error. Getting frustrating. When I go into the ~Users folder it shows as an excel file and saved as .xlsx.
Where would the link be missing?
Here is the code
Code:
ActiveWorkbook.SaveAs Filename:= _
"G:PURCHASINGSupplier ServicesGroupSharePublic~UsersPO Acks for " & Format$(Date, "mm-dd-yyyy") & ".xlsx"
View 2 Replies
ADVERTISEMENT
May 15, 2009
Apparently my program quits after i try to open an excel file. If you open the file manually you get an error upon opening the file...something like this:
"File you are tyring to open is in a different format than specified by the file extension".
The problem is i am using an excel macro using VBA and once the file is opened the VBA execution quits.
The excel file turns out to be an xml file which excel can open the file and have the VBA continue running if i RENAME the file with an "xlsx" extension. The problem is that i cant ask the user to rename the file.........how do i get VBA to open the file without an issue?
View 13 Replies
View Related
Aug 3, 2005
i have a customer (im a computer tech, but excel is not my specialty) that has a weird problem with her most important file. She meant well, but tried to back up a 2.6 MB file to a floppy disk, and after it told her the disk was full, she was unable to open the file again in excel. (File Format Is Not Valid) It will, however, open in word, with the data there. Its in an unusable format, as there were 12 different worksheets (one for every month), all on the one page of MS Word. Better than nothing, but still will take weeks to reenter properly. I searched for a repair utility and had one that seemed to work, but only put a "0" in column A row 8. A far cry from what we are looking for. Ive also run a disk recovery program in the hopes of finding an older version of the file, but came up empty.
View 9 Replies
View Related
Mar 12, 2014
How can I save worksheet from existing workbook as a new workbook with extension .xls or .xlsx depending on the version of Excel on which the original was opened and no matter the extension of original?
My code that I was trying to create all above does not work, because even if I am using Excel 2007, 2010 or 2013 it will still be saving only as .xls.
View 2 Replies
View Related
Feb 18, 2009
I have a sheet I am working on that was given to me by a supplier and for example the cell in A1 is '2008_world_soccer'. How do I add '.jar' to the end of the filename bearing in mind the filenames are not the same length in each cell. So it would then read '2008_world_soccer.jar' or ''2008_world_soccer_GB_test.jar' etc. Any ideas that would saving me having to edit and type .jar at the end everytime for over a thousand records?
View 3 Replies
View Related
Dec 7, 2009
I have a list of file names in an excel sheet. The requirement is to find the extension of each file in the next column. For example
file name 123.456.789.jpg
extension jpg
file name 123.abcd.789.xlam
extension xlam
is there a worksheet function equal to InStrRev in vba?
View 6 Replies
View Related
Feb 21, 2013
I opened a file, by file I mean a "file" with no extension that has commas separating it.
So I recorded a macro to open up the file and this works fine.
How do I close it? I tried
wk1 = ThisWorkbook.Name 'Main Worksheet
...
Workbooks(wk1).Activate
ActiveWindow.Close
But the problem is that "wk1" is not set equal to the name, probably because the file is not an excel file, it has no extension.
View 2 Replies
View Related
Jun 26, 2014
I need a VBA script which only opens the file with the highest extension.
The files are test.aa1, test.aa2 and test.aa3. This can go up to 5. In this case the filoe test.aa3 should be opened.
View 1 Replies
View Related
Mar 31, 2009
creating a macro that will inport file exention which has WK4 , i have lotus notes at work i have exported email file to drive U: , i require a macro to pick this file up and export to Sheet Group_Mailbox. The range is A9
View 9 Replies
View Related
Jul 9, 2013
I have a column that looks like this, beginning on C10:
Code:
File Name
2316-17-312A.xrdml
2316-17-312B.xrdml
2316-17-312C.xrdml
[Code].....
I want to copy the extension of each file to a new column (File Type). How might I go about this?
View 9 Replies
View Related
May 21, 2007
Has anyone got the add in code? I have my own custom menu bar on my excel. But every time i want to add a new link i must go into the code and manually add the file name extension and relevant VBA code. Is there a method of just entering the file extension in a cell range and excel will automatically update or pick up or link from this location?
View 9 Replies
View Related
Aug 23, 2007
I am attempting to write a macro that will open every file in a given folder, then save the files with a new file names while keeping the original file extension. The files I'm opening with excel have file extensions of ".VA", ".TOU", and ".KVA". The new file names I want to save the files with are contained in cell A1.
An example would be:
The excel macro opens file "R003890.TOU"
The macro assigns a the value in cell "A1" (B1040) to a variable
The macro assigns the file extension (.TOU) to a variable
The macro saves the file as file name variable and file extension variable (B1040.TOU)
View 9 Replies
View Related
Apr 8, 2008
I'm trying to insure that when a file name is inputted into cell "DA7" that the string ends with a ".xls" extension. I'm using "DA7" as a target and have written the following code. When executed nothing happens.
If Target.Address = "DA7" Then
Dim ta As String
ta = Target.Value
If Right(ta, 4) <> ".xls" Then
MsgBox "The file name must end with a '.xls' extention"
Target.ClearContents
End If
End If
View 2 Replies
View Related
Aug 21, 2012
I have a folder containing 1000's of files. All the files end in .txt (for example test.txt) but are actually excel files. When I go to open the files with excel I get the following warning:
The file you are trying to open is in a different format than specified by the file's extension. Verify that the file is not corrupt and from a trusted source before opening the file. Do you want to continue?
I click "yes" and it opens fine as an excel file.
I want to merge all these files one after another into one file.
View 1 Replies
View Related
Jun 23, 2014
I have a master workbook that contains macros and has an xlsm extension.
One macro in the workbook copies one of the worksheets to a new workbook. I then want to save this new workbook as an xlsx file. I use the following code line:
.SaveAs Filename:=Extract_Save_Name & ".xlsx", FileFormat:= _
xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False
However, when I run the code I get an error:
"This extension cannot be used with the selected file type."
The new workbook does not contain any macros and if I save the workbook "manually" as an xlsx it saves fine.
If I change the code above to have "xlsm" it works fine - but I don't want that extension.
View 1 Replies
View Related
Oct 10, 2011
VBA coding for automatically saving an excel file as another file using the current date as part of the file name together with "32ga" as a constant add-in. I also what this macro to run at a particular time of the day let say 00:20hrs. The excel file i want to save as is always open . It has data that changes every 24-hrs.
View 1 Replies
View Related
Dec 18, 2012
I have a template file for ordering trafolyte and steel plates. I have added macros to this template file. The existing macros do the following (shortly described):
Macro 1: clears order
Macro 2: update order date + send a read only file to the supplier of plates + save a read only copy of the file into one of three folders acc to info in one of the cells.
It's the Macro 2 I want to edit.
I want to add a "function" which copy a selection of data.column A to N from row 12 to 548 but only the rows where there is a value in column A.
Row 1 to 11 includes standard order info and Macro buttons.
Row 11 includes the heading for order data.
For everytime someone click on the Macro 2 button in the template file, I want the selection to be paste into the first "available" row in a "Total list" file.
The "Total list" file may have to be open (or a function to open, paste selection and then close the "Total list" file may be added)
File and Folder info:
To simplify suggestions, the following file and path info can be used (I can change to the correct later):
Template file name: template_order.xlsm
Template file location: \servershared emplate
Total list file name: total_list.xlsx
Total list file location: \servershared otal
Selection info:
The template file exists of a "general order info area" A1:N10
The column heading for order data is located at A11:N11
The selection to be copied is A12:N550 - But only rows where column A includes data (not empty).
(If the spesific order consists of 14 plates than there will be item no 1-14 in column A and I then I want to copy A12:N25 (row 25 will be item 14).
When I try to use record macro it looks like it only records what's happening in the template file - It doesn't record the pasting in the total list.
View 1 Replies
View Related
Sep 1, 2009
I have files which are in "3I8" format....they open with excel....but the real problem is the data it has ( 121 801 1) is in one cell.....I should be able to add the last number....I cannot do it manually(8000 rows)...is there a way I can separate all three numbers in to each different cells in a single row.
View 3 Replies
View Related
Apr 8, 2009
i have an issue with CSV file format when opening in excel, between Col G and L i have cells which are overlapping to the next cell, not all of them overlap but there is quite a few, is there a way i can fix this, i have 20000 rows of data, i dont want to be going through manually trying to fix.
PFOLIOA/C CODEACCT NAME CURCODE DESCRIPTNNARRATIVE DATE ENTRY DATE CASH VALUE De--------------------------------------------------------------------------------------------------------------------------------------------ABA001AUDCUST NOMINEES AUDINT0005 SALE 39727.08 INTECH BAL GR FD C29-Dec-082-Jan-09-27690.57N
This is what i want to achieve
PFOLIOA/C CODEACCT NAME CURCODE DESCRIPTNNARRATIVE DATE ENTRY DATE CASH VALUE De--------------------------------------------------------------------------------------------------------------------------------------------ABA001AUDCUST NOMINEES AUDINT0005 SALE 39727.08 INTECH BAL GR FD C29-Dec-082-Jan-09-27690.57N
View 9 Replies
View Related
Jan 23, 2014
Why excel won't accept a simple COUNT function?
This is the formula. It is supposed to count every 4th cell in a column.
=COUNT(F156,F152,F148,F144,F140,F136,F132,F128, F124,F120,F116,F112,F108,F104,F100,F96, F92,F88,F84,F80,F76,F72,F68,F64,F60,F56,F52,F48,F44,F40,F36,F32,F28,F24,F20,F16,F12,F8,F4)
Excel tells that it will accept up to 255 arguments in a COUNT function, but it'll only let me include:
=COUNT(F156,F152,F148,F144,F140,F136,F132,F128,F124,F120,F116,F112,F108,F104,F100,F96,F92,F88,F84,F80,F76,F72,F68,F64,F60,F56,F52,F48,F44,F40)
I have to use this exact same formula as a SUM function as well, but am having the same problem. Neither SUM or COUNT will take all the arguments.
I've attached the file. The tabs in red are the worksheets that won't accept the formula. The green tabs worked fine (they all had less cells to include than the sheets in red.)
01-09-14 RouteSheets SLO.xls‎
View 4 Replies
View Related
Jun 18, 2003
I am trying to save a file into a CSV format. When I choose that save as option the file is saved with the commas but a need each field to be surrounded by quotes.
Is there an easy way to do this? I know I could append the " around the data in each cell with a formula, but I'm hoping there is a cleaner way to do it.
I would also like to set the extention of the saved file to .txt when I save it, but Excel 2000 does not seem to let me do that.
View 2 Replies
View Related
Jun 16, 2008
I have a file with code attached and when I try to save it I am told that the file cannot be saved in this format and that I must unprotect the code before saving.
I have no OnEvent macros in the code.
Does anyone have a solution for this problem. The code must be protected, non-protection is not an option.
View 9 Replies
View Related
Mar 14, 2007
My company uses database software called Business Objects. At the moment few people are using the program and its reports as they can't find the key ones or workout how to run them correctly. As everyone is comfortable with excel. I am creating a series of forms to guide my users to the key reports. I like this method because it is very user friendly and I can add lots of descriptions. Unfortunately my programming knowledge is limited to excel so I can't write a standalone program as you might suggest I do.
The problem:
I want to launch the non-excel files using VBA. For example, a user will click on a "Customer" button to see a second form containing a list of customer reports. The user will then click on the button containing the name of the report they want to launch. I want the file to open. I tried using hyperlinks in an excel spreadsheet which works fine for opening the non-excel files, but it isn’t nearly as user-friendly or interactive.
View 4 Replies
View Related
Apr 3, 2014
I am facing a weird date format error in .csv file for a specific time periods.
I have a file where data is stored on monthly basis from the years 1976 uptil today. I have all the data months in expected format except for the years 1989, 1990 and 1991. These files are created by using Informatica and SAS.
For example:
Expected date format = 1-January 1989
Actual Date Format = 1-Jan-89
This issue doesn't exist when we open the same file in Excel, Textpad and Notepad.
I have attached screenshot of the data (filename: CSV Issue.JPG).
View 7 Replies
View Related
Mar 20, 2006
I have done this several times in the past, but don't do it often. I have an
Excel spreadsheet that I need to save in DBase IV format, but when I try, it
cu ts off all of the columns to the right of what I can see on the screen
when I go back into the DBF file.
View 10 Replies
View Related
Oct 21, 2008
I have received a large file of text and numbers arranged (loosely) in columns in a .txt file that I need to get into a usable form in Excel. I'm trying to use the Text Import Wizard but am running into problems geting the column breaks right as there are thousands of rows of data items. As soon I think that I've inserted the break line in the correct place I scroll down a little further to find an item that encroaches into the next column, and when I shift the break line to the right to accommodate this new item I then encroach on the items in this next column.
View 2 Replies
View Related
Oct 21, 2009
I am working on an excel dashboard to display life information about energy consumption.
there is currently a bespoke syatem which does this but we need the dashboard to be changed so the job has fallen to me.
Energy usage across the site is recorded in a spreadsheet (automatically) every half an hour and is saved in a folder named CSV data, however the files are saved in a format which i assume is something for the current package: *.ew7
I can open and view the data by clicking "open as" and selecting excel.
I can reference to this data from another excel spreadsheet (dashboard) whilst they are both open it will update.
However when i close all spreadsheets and open just the dashboard it tells me that the links cannot be updated.
I need a solution or a way around this so i can reference from one workbook to another.
Has anyone had any experience of this kind of thing? can anyone offer a humble analyst a bit of advice?
I was not able to attach the file here (as its in the ew7 format) but i have uploaded it to rapidshare for anyone who wants to take a look...
View 14 Replies
View Related
Apr 8, 2009
I am running a DOS command to create a directory listing of ONLY DIR files with the short dos filenames and the long filenames. The command used is
DIR /A:D /X /N /S > c:sampledata.txt
Once read into excel, I simply want to have a spreadsheet with the following:
Directory Path Name, DIR Short Name, DIR Long Name
Anyone have some code to already do this? I have attached the sampledata.txt file to go with the pseudo code.
View 9 Replies
View Related
Apr 9, 2012
I have the following code which is part of a much larger macro which is converting a number so that the the trailing zero in the number 49.50 appears in the formula bar. This is essential as the eventual csv file links to an external printing program which only prints what is sees.
My problem is that this fix works when the file is saved in excel format, but when I save it in CSV format the number reverts to 49.5. How can I convert the original number which appears as 49.5 in the formula bar and is viewed a 00000050 in the file that the sent through. I cannot convert using the text to columns when the file is opened as the other codes in the original file need to maintain the original formatting.
Code:
Sub mc003()
For Each ws In ActiveWorkbook.Worksheets
ws.Activate
[Code]....
View 6 Replies
View Related
Jul 1, 2014
Isn't there a checkbox somewhere where I can tell Excel 2007 to leave xls files as they are? My Excel 2010 doesn't urge me to save an old xls file format into xlsx but in Excel 2007 I can't find a switch (and I don't rememeber if I had to do anything in 2010). So ultimately I want to stay in compatibility mode when using old files.
View 2 Replies
View Related