LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!
if you really have this file with exactly this name on your hd, then you could check for possible problems like this:
...
put URL ("file:" & "H:/Excel/Revolution/Stock files from QAD") into aVariable
answer the result
## "the result" is empty on success and may give a hint on what goes wrong otherwise
...
Haven't looked at the scales thing yet. Got some more basic issues to resolve first. Mean time we'll just manually enter the weight data.
I notice that in the code I supplied that i didn't have the actual file name at the end. I added that and used the answer result script and when i execute the script it says it can't open file which doesn't help me a lot!
First, either use "answer file" to choose the file, or put your path in a variable and use "if there is a file" to verify you're correct.
Every character matters in the path, it's unforgiving, so you have to double-check.
Then, make sure you don't have the file open in another app! You might think for read-only it wouldn't matter, but it could be locked.
Best wishes,
Curry Kenworthy
LiveCode Development, Training & Consulting
http://livecodeconsulting.com/
WordLib: Conquer MS Word & OpenOffice
SpreadLib: "Excel-lent" spreadsheet import/export
http://livecodeaddons.com/
I'm really struggling with this. I thought it would be easy peasy! I can't get the file to open and have cut and pasted the file location only changing the \ to / as i understand I'm meant to do. Would putting the file i want to open in a directory close to the application help? I was trying to pull it in from a remote drive.
put URL ("file:" & "H:/Excel/Revolution/QADFiles/stock.txt")into aVariable --into fld "StockCover" of card "Planning"
answer the result
the result is "Can't open file"
I've looked at the file and it's not locked or used on anything else. It is an excel file saved as a text file which I can upload manually into fld "StockCover" without any issues at all. All I want to do is automate that process!
If you follow my signature consulting link to find my email...and send me your stack and the file to import, I can get the import and the column separation (your other topic) working quickly for a very small flat fee.
Best wishes,
Curry Kenworthy
LiveCode Development, Training & Consulting
http://livecodeconsulting.com/
WordLib: Conquer MS Word & OpenOffice
SpreadLib: "Excel-lent" spreadsheet import/export
http://livecodeaddons.com/