7 Replies Latest reply on Aug 13, 2013 12:10 PM by philmodjunk

    Creating an Excel file with variable information

    MrMLK

      Title

      Creating an Excel file with variable information

      Post

           I would like to generate an Excel file with the following charachteristics:

           1)  Two Seperate tabs in one file with two different record dumps. The names of the tabs should be generated at run time.

           2) Each Tab would be in the form of:

           Title Line           Variable Information, Variable Information 2

           Row 1

           Row 2

           ......

            

           I know how to do the "Save records as excel", but as far as I can tell, that command doesn't let me speciafy the tabs names programatically, and I don't know how to add the title lines.

            

           Thanks.

            

            

        • 1. Re: Creating an Excel file with variable information
          MrMLK

               So, I've figured this all out on my own, except for two things:

               1) I can't figure out how to change the column headers from the FIeld Name to the something else. I can turn off the field name, but is it possible to put some better header in there?

               2) I am using a date field for the tab name. RIght now it is showing it as "M_D_YYYY" Is there some way to format it so that it shows "M-D-YYYY" instead?

          • 2. Re: Creating an Excel file with variable information
            MrMLK

                 Sorry, one more thing.

                 I want to create an excel file with 2 different tabs with two different exports. Is there some way to get Filemaker to apend to the file, rather then to delete it and recreate each time?

                  

            • 3. Re: Creating an Excel file with variable information
              philmodjunk

                   There is no way to get just FileMaker to append data to an existing file. One method I have seen described here is to set up a macro on the excel file that imports the needed data from the excel (or tab or csv..) file that you export from FileMaker.

              • 4. Re: Creating an Excel file with variable information
                MrMLK

                     Thanks.

                      

                     Is there any way to get Column headers other then the Table/Field Names?

                • 5. Re: Creating an Excel file with variable information
                  philmodjunk

                       Not really. The only method that I know of is to create a "dummy record" with field names in place of data as the first record exported.

                       But if you have to export to Excel File 1 and then use a macro to pull it into Excel File 2, you can have the desired column names set up in Excel File 2.

                       And you may want to investigate xml exports as I think that you can rename the fields as part of the export with that method and I would think that Excel can probably import from xml.

                  • 6. Re: Creating an Excel file with variable information
                    MrMLK

                         > The only method that I know of is to create a "dummy record" with field names in place of data as the first record exported.

                          

                    I thought of that, but thne I would also need to create a dummy table to hold the records (because some of the fields were numbers instead of Text, and I would need to copy the data one record at a time to maintin the sorting I wanted with the Headers at the top.

                          

                    And I am still not sure how I am going to get the numbers and dates formatted correctly in the Text fields in the new table.

                    • 7. Re: Creating an Excel file with variable information
                      philmodjunk

                           You wouldn't need to copy the data one record at a time to maintain the sorting that you want--import records could pull in the data in the current sorted order all in one go. But the rest is correct.