Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi
I have discovered that when I download a CSV file, that always contains a "]", from the work financial system, the previous Application Event trapping of the form Wb.Name includes the "]" character no longer traps the the file even though the actual filename still contains a "]". The Wb.Name now converts the square bracket "]"to a round bracket ")". What is really odd is that if I use the Wb.FullName property the "]" is included in the string Wb.FullName and so I can trap the "]" that way. My question is why is the Wb.Name property no longer properly reflects the actual filename (any more). Any help most welcome. Tim |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tim Childs formulated on Friday :
Hi I have discovered that when I download a CSV file, that always contains a "]", from the work financial system, the previous Application Event trapping of the form Wb.Name includes the "]" character no longer traps the the file even though the actual filename still contains a "]". The Wb.Name now converts the square bracket "]"to a round bracket ")". What is really odd is that if I use the Wb.FullName property the "]" is included in the string Wb.FullName and so I can trap the "]" that way. My question is why is the Wb.Name property no longer properly reflects the actual filename (any more). Any help most welcome. Tim Are you importing the file directly from the url or saving it to disk before import? -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hi Garry
I'm just downloading it into Excel itself i.e. not formally saving it. In practice, the file seems to exist in one of Microsoft's launch areas Tim "GS" wrote in message ... Tim Childs formulated on Friday : Hi I have discovered that when I download a CSV file, that always contains a "]", from the work financial system, the previous Application Event trapping of the form Wb.Name includes the "]" character no longer traps the the file even though the actual filename still contains a "]". The Wb.Name now converts the square bracket "]"to a round bracket ")". What is really odd is that if I use the Wb.FullName property the "]" is included in the string Wb.FullName and so I can trap the "]" that way. My question is why is the Wb.Name property no longer properly reflects the actual filename (any more). Any help most welcome. Tim Are you importing the file directly from the url or saving it to disk before import? -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Tim Childs expressed precisely :
I'm just downloading it into Excel itself i.e. not formally saving it. In practice, the file seems to exist in one of Microsoft's launch areas Tim What I get when I downoad a CSV from a website is the file opens in a new book and the filename in the title bar is... Filename.CSV [Read Only] ...which requires me to use 'SaveAs' if I want to save it. These are the only square brackets I see, and which are put there by Excel. Mind you, I'm downloading the file into Excel via a hyperlink on a worksheet. -- Garry Free usenet access at http://www.eternal-september.org ClassicVB Users Regroup! comp.lang.basic.visual.misc |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Excel doesn't like those square brackets in filenames. Heck, it doesn't like
those square brackets in sheet names, either. If you write a formula that refers to a range in another worksheet in a different workbook, you'll see that excel wraps the filename in those square brackets. I do my best to remove them from the filename before doing anything within excel. And I don't like the # sign in filenames either (if you're fixing names). That character in the filename will break hyperlinks to that file. On 04/15/2011 15:25, Tim Childs wrote: Hi I have discovered that when I download a CSV file, that always contains a "]", from the work financial system, the previous Application Event trapping of the form Wb.Name includes the "]" character no longer traps the the file even though the actual filename still contains a "]". The Wb.Name now converts the square bracket "]"to a round bracket ")". What is really odd is that if I use the Wb.FullName property the "]" is included in the string Wb.FullName and so I can trap the "]" that way. My question is why is the Wb.Name property no longer properly reflects the actual filename (any more). Any help most welcome. Tim -- Dave Peterson |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Dave
as you say Excel does not normally permit those square brackets any ideas on the perverse behaviour of Name / FullName many thanks for the response Tim "Dave Peterson" wrote in message ... Excel doesn't like those square brackets in filenames. Heck, it doesn't like those square brackets in sheet names, either. If you write a formula that refers to a range in another worksheet in a different workbook, you'll see that excel wraps the filename in those square brackets. I do my best to remove them from the filename before doing anything within excel. And I don't like the # sign in filenames either (if you're fixing names). That character in the filename will break hyperlinks to that file. On 04/15/2011 15:25, Tim Childs wrote: Hi I have discovered that when I download a CSV file, that always contains a "]", from the work financial system, the previous Application Event trapping of the form Wb.Name includes the "]" character no longer traps the the file even though the actual filename still contains a "]". The Wb.Name now converts the square bracket "]"to a round bracket ")". What is really odd is that if I use the Wb.FullName property the "]" is included in the string Wb.FullName and so I can trap the "]" that way. My question is why is the Wb.Name property no longer properly reflects the actual filename (any more). Any help most welcome. Tim -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How to Get Files.FullName | Excel Programming | |||
extract path from FullName | Excel Programming | |||
Citrix and FullName | Excel Programming | |||
FullName vs FullNameURLEncoded | Excel Programming | |||
ThisWorkbook.FullName | Excel Programming |