Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 4799 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

I am confused again. If I create a new file and export, it shows character set 'windows ANSI' and allows me to change it if I wish. Right now I am afraid to because I figure the default must be best. Here is my issue

when I script import I am not given option for character set but after I leave the script it shows windows ANSI. My problem is that scripted import of excel sheet breaks on mac and I wonder if this is why. Does Mac understand Windows ANSI? If the import is going to happen on both OS' do I need to branch my script with two different imports? Ok. Why UTF-16 and UTF-16 for Mac? See why I am confused?

BTW I read UTF-8 is the 'new rich' and should be used for everything. And I have read its standard language and characters and all. But what do we in FileMaker use and are there other things I must know when file is importing on Mac? Thank you all for you generous time and patient attitudes. I am learning as quickly as a human can and I still come up short every minute.

Posted

Why don't you start at this point:

My problem is that scripted import of excel sheet breaks on mac

What exactly does "breaks" mean? Can you post a sample Excel file that causes this problem?

Posted

Good morning, Comment,

I apologize for jumping the gun. He left before I could get the file and all I was told was that "Zach's import breaks on his new Mac". I had planned to study everything that might cause a break through the weekend so I was prepared with all the possible answers on Monday (which is why I was so quick off the starting line LOL).

He just emailed me the file. The extension is .xlsx and it is an option in my Excel drop-down but it is not a normal extension we use. In fact, I am surprised it even runs on Windows since Windows only allows three character extensions I think. My import script has drop-down also and it says Excel 95-2004 and that is the computer I used to save the import step. Reading up, it says xlsx is new Excel which is combination of xml and zip. I just realized that I cannot post the file itself because of the information it contains (money to people). Should I delete all the data lines and attach it anyway?

Is Excel backward compatible? If so, maybe I can save the import script using new Excel. That will solve Zach's problem but will others then fail? I will get to work testing what I can but without both types of computers and both versions of excel I am unsure how thorough I can be.

All this stuff is short term issue since I plan to replace all their programs soon but I still need to get this working for now. Each time I say fm can do something, they want me to do it and then I have to figure out how. It is not always easy either.

This thing here? I did not figure for. :turned:

Char()

Posted

Is Excel backward compatible? If so, maybe I can save the import script using new Excel.

Not sure I understand what you mean by that. If some of your users import .xls files and others .xlsx files, then obviously there is a limit to what your script can enforce.

Posted

If I import a file made from newer version of a program, it usually can not work because things are in new version that older version can not interpret. But newer versions of programs can usually open older versions at least for a time. I am thinking then that if I get the newer Excel program, manual map to xlsx and save it that then import can read the newer Excel on Mac and also still read and properly import the older Excel files on windows. And it follows then that FileMaker would probably match their coding to be consistent so FM would also know to use same program. just my thinking

Or are you saying that they are very different and that one is not just an updated replacement for the other? If so then they would need to be created as two different imports probably. I can do that too. If I can not simply click on an excel file and open it, having it understood from all the programs involved, then it is not normal in my book and we should not use it. If it is the new upcoming excel Star then we should all move together.

As to what users are allowed to import - they have no control. It looks for file in specific location named a specific thing and just takes it. It shouldn't have taken it at all. I think because I changed the original script from Position() to use PatternCount for "xls" and it was breaking when using Right(name;3) so it saw lsx. I thought Patterncount would be faster but I read later how it can break. I had forgotten.

Posted

Sorry, but I am not following you. Filemaker can import both .xls and .xlsx files - and you don't need any version of Excel for this. However, if your Import Records[] script step is set to import "source.xls" then it will not import "source.xlsx". What you can do is something like:

Set Error Capture [ On ]

Import Records [ No dialog; Source: "source.xls" ]

If [ Get ( LastError ) ]

  Import Records [ No dialog; Source: "source.xlsx" ]

End If

I don't see where Position() or PatternCount() come into this.

Posted

Good idea! That script approach should work fine. I will try it tomorrow when I meet with Zach and his Mac.

My error, please forget the Position() or Patterncount() comments. I originally had it that way before finding out about not Empty( FilterValues() for something like this. I checked and that wasn't the problem, whew. :)

This topic is 4799 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.