1 2 Previous Next 15 Replies Latest reply on Sep 26, 2013 9:26 AM by philmodjunk

    View an Excel file within a container field?

    CekariYH

      Title

      View an Excel file within a container field?

      Post

           Is that possible?

            

           No getting data, just as an visual aid for some special work? Like the web viewer...

            

           ...or just open the excel-file with Excel from within FMPA perhaps?

        • 1. Re: View an Excel file within a container field?
          philmodjunk

               You won't be able to view the contents in the container field, but any field inserted into a container field may be opened by the OS specified default application for that file type.

               If you use insert file with the store a reference option, you can open the file with a double click. (In FileMaker 12, make sure that the field is NOT optimized for interactive use or the double click won't work.)

               Regardless of what storage method and insertion menu choice was made to insert the file, you can use Export Field Contents--something that you can script, to open a copy of the file.

          • 2. Re: View an Excel file within a container field?
            CekariYH

                  

                 

                      You won't be able to view the contents in the container field, but any field inserted into a container field may be opened by the OS specified default application for that file type.

                 Sorry, there you lost me?

                  

                 

                      If you use insert file with the store a reference option, you can open the file with a double click. (In FileMaker 12, make sure that the field is NOT optimized for interactive use or the double click won't work.)

                 

                      Regardless of what storage method and insertion menu choice was made to insert the file, you can use Export Field Contents--something that you can script, to open a copy of the file.

                 Still lost, I just want to open an Excel Name.xls file either in a container field or just open Excel with the Name.xls besides FMP. Only for viewing as it's locked from manipulations and there are no values (fields) in the Name.xls that are needed in FMP, just some advanced graphs there to examine. It's a very complicated .xls with lot and lots of data-values from different places internally from process-computers and externally from around the country and it's not many "table-like lists in" it, just a lot of math to get the graphs. 

            • 3. Re: View an Excel file within a container field?
              philmodjunk
                   

                        Sorry, there you lost me?

                   Every file on your computer is of a specific file type. In windows, this is identified by the file extension. Mac's used to use a different method, but I don't know what they currently use, but in both systems, every file has a specified file type. Your OS also maintains a list of these types and what installed application, if any, will open a file of that type when you double click it. Thus, I double click a .PDF file and it opens in Acrobat Reader. On a different computer, double clicking the same file might open it in a different PDF utility. That would be due to each computer having a different default application specified for PDF files.

                   When you use either the double click method on a "by reference" container field or export field contents with the "open" check box selected, FileMaker gets your OS to open the file with that same specified application for the file type as recorded in the OS's data structures.

                   

                        Still lost,

                   I suggest that you look up container fields in FileMaker Help and any training materials you have. A container field stores one of two things: 1) a physical copy of a file or 2) A reference to where the file is physically stored. The storage options that you specify when defining the field and the options you select when inserting a file determine which happens for any given inserted file.

                   FileMaker 12 has complicated this a lot by adding a lot more options/features when working with data in container fields. A new "by reference" option of a sort has been added by allowing developers to specify an "external storage" option. If you select this option, you insert a physical copy of the file into the container field (called embedding the file), but then FIleMaker copies the file to the specified location for the container field and updates the container field to contain a reference to the copy of the file placed at this location.

                   Then FileMaker 12 makes it even more confusing by adding a layout data format option called "optimize for interactive content". This is useful for audio, video and PDF files as you gain controls for viewing the embedded document right in the container field--but only for files of those types. MS office files can't be viewed through this option.

                   So the only way that you can view the contents of a file inserted into a container that isn't of the types I just listed is to have FileMaker tell the OS to open the file. If you have stored the file "by reference" (and not in an external storage container field), FileMaker just passes the file path to the OS and it uses it to open the file. But if it's not stored by reference, there's no file path to pass on to the OS. Instead, these can be opened by exporting a copy of the file and then FileMaker can tell the OS to open that copy of the file. (And you can't open any file by double clicking if it has been "optimized for interactive content".)

                   Given what you have now specified in more detail, I suggest two alternatives to explore:

                   1) Can you open an Excel file with a web browser? If so, it may be possible to use a Web Viewer layout object to open and display your file inside the web viewer.

                   2) Create a PDF of the Excel charts that you want. Then insert this PDF into the container field. The PDF can then be viewed in the container field and if you use that "interactive optimization" option, you can even click through multiple pages right in the container field.

              • 4. Re: View an Excel file within a container field?
                schamblee

                     Open url will let you open a file in the default application. You have to know the path to the file you want to open.

                http://help.filemaker.com/app/answers/detail/a_id/2982/~/opening-a-web-page-url-from-filemaker-pro

                • 5. Re: View an Excel file within a container field?
                  GuyStevens
                       

                            You won't be able to view the contents in the container field, but any field inserted into a container field may be opened by the OS specified default application for that file type.

                       You may have gotten lost there because there was a typo.

                       It's supposed to say: "but any FILE inserted into a container field..."

                       The way I would do this is to make a container field visible on the layout where you can insert an excell file.

                       You could create a button "Insert Excel File" that inserts the file into the container field.

                       Then you could either double click it to open the file. But like PhilModJunk said when it's set to be optimized for interactive use that will not work.

                       The alternative is to create a second button called "Open excell file".
                       Clicking that button can run a script that exports the excell file in that container field (Export Field Contents) and stores it on your computer somewhere and opens it in excell.

                       If you are stuck somewhere don't hesitate to ask.

                  • 6. Re: View an Excel file within a container field?
                    CekariYH

                         Thanks all, got it to work.

                          

                         I made an container-field that was made to look and behave like a small button (very easy in FMP), and that uses the "Open URL" from a global variable-field with the file-path to the excel-file to open the excel-file with Excel.

                         Example file-path in Mac OS X: file:///Users/Cekari/Desktop/Elpristest.xls 

                          

                         Great, thanks again

                    • 7. Re: View an Excel file within a container field?
                      CekariYH

                           Another question:

                           Is it possible to get values from a web-site into FMP?

                           Either by automatic or, with "Copy/Paste" will also do.

                           I have a Tab on a Layout that opens this: http://wwwdynamic.nordpoolspot.com/marketinfo/elspot/stockholm/elspot.cgi

                      and then you have to klick the SEK button at the right top there, and then I want all the "table-data", just the numbers including dates and times, into FMP.

                           Looks like this and updates every day at noon+1h local time.: 

                      • 8. Re: View an Excel file within a container field?
                        philmodjunk

                             Take a look at the Insert From URL script step.

                        • 9. Re: View an Excel file within a container field?
                          CekariYH

                               I have come so far that I select the table and then past it into a textfield and from there by means of a lot of text parsing functions i got everything working localized etc,,, just wish i could skip the manually select copy paste step, bur this will do for now.

                          • 10. Re: View an Excel file within a container field?
                            philmodjunk

                                 To repeat: Take a look at the Insert From URL script step.

                                 this script step should eliminate the need for the manual copy and paste.

                            • 11. Re: View an Excel file within a container field?
                              CekariYH

                                   Yes Phil, I will, and tried but the link above shows there are more above the part that I need so for now I just mark from the first day-name to last AVG number Ctl-C and then just press a button and all of i goes into different repeating fields. works great, but I will learn how to make it auto-fetch later on, when i found a way to make a line-counter function for a text-field.

                              • 12. Re: View an Excel file within a container field?
                                philmodjunk

                                     Insert from URL inserts the entire text content from the web page, but once inserted, scripts, calculations, etc can parse the text thus inserted to get what you want.

                                • 13. Re: View an Excel file within a container field?
                                  CekariYH
                                       

                                  Insert from URL inserts the entire text content from the web page, but once inserted, scripts, calculations, etc can parse the text thus inserted to get what you want.

                                       Well, that doesn't work completely automatic as the site displays "EUR" as default currency and I need "SEK", so if you can't tell me how to press that button from within FMP or send 6 "tab" and 1 "enter"  to the site my approach works second best.

                                       Se link:  http://wwwdynamic.nordpoolspot.com/marketinfo/elspot/stockholm/elspot.cgi

                                       ...so upon start of the FMP App it does among others a check if it's in "SEK" else it tells the user to press the button and he /she can't leave until it's done so to say, then it checks if a new list have been loaded on the site (once a day at about 1 pm or sometimes an adjusted list only in the meantime), if so the app just copies the hole thing to a hidden text field and then some text-parsing is done to get the days, dates and values into a bunch of repeated fields in some loops and also converting to Swedish names/formats at the same time. So after an initial setup it's fully auto until the app is re-started.

                                       Tried the way you told, but it was hopeless to extract all neatly in a "zillion"-line HTML coded text :-)

                                  • 14. Re: View an Excel file within a container field?
                                    CekariYH

                                         BTW, repeted fields are called arrays in other computer languages, and I think FMP lacks some great to have functions, like copy one array to another without loops and such.

                                         Like: 

                                         Array1 :=: Array2 //Copy one array to another.

                                         Compare Arrays if the values inside are the same.

                                         +-*/ on Arrays

                                         etc etc

                                         ...and since a multiline text-field is a sort of Array like a ¶ delimited static-list and others, so way no functions to work as such on them?

                                          

                                    1 2 Previous Next