ggreen86 / XLSX-Workbook-Class

VFP Class to Create an XLSX Workbook without Excel Automation or Installed
45 stars 16 forks source link

WriteSheetXMLS - Sets All Columns to Hidden rather than just the single column. #103

Closed rawilliamsjr closed 8 months ago

rawilliamsjr commented 8 months ago
            DO CASE
                CASE lnColWidth > -1.00 .AND. xl_temp.collevel = 0 .AND. **_xl_columns_**.hidden = 0
                    FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" customWidth="1"')

                CASE lnColWidth > -1.00 .AND. xl_temp.collevel = 0 .AND. **_xl_columns_**.hidden = 1
                    FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" hidden="1" customWidth="1"')

                CASE lnColWidth = -1.00 .AND. xl_temp.collevel > 0
                    FWRITE(lhFile, ' outlineLevel="' + TRANSFORM(xl_temp.collevel) + '"/>')

                CASE lnColWidth > -1.00 .AND. xl_temp.collevel > 0
                    FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" customWidth="1" outlineLevel="' + TRANSFORM(xl_temp.collevel) + '"')
            ENDCASE

Should be

            DO CASE
                CASE lnColWidth > -1.00 .AND. xl_temp.collevel = 0 .AND. **xl_temp**.hidden = 0
                    FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" customWidth="1"')

                CASE lnColWidth > -1.00 .AND. xl_temp.collevel = 0 .AND. **xl_temp**.hidden = 1
                    FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" hidden="1" customWidth="1"')

                CASE lnColWidth = -1.00 .AND. xl_temp.collevel > 0
                    FWRITE(lhFile, ' outlineLevel="' + TRANSFORM(xl_temp.collevel) + '"/>')

                CASE lnColWidth > -1.00 .AND. xl_temp.collevel > 0
                    FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" customWidth="1" outlineLevel="' + TRANSFORM(xl_temp.collevel) + '"')
            ENDCASE
ggreen86 commented 8 months ago

Rob—

Thank you for this correction. I have applied it to my code base. I have several other issues to look at (but have limited time right now) and resolve. I will then upload as a new release.

Greg

From: Rob Williams @.> Sent: Wednesday, December 20, 2023 6:34 PM To: ggreen86/XLSX-Workbook-Class @.> Cc: Subscribed @.***> Subject: [ggreen86/XLSX-Workbook-Class] WriteSheetXMLS - Sets All Columns to Hidden rather than just the single column. (Issue #103)

                   DO CASE

                           CASE lnColWidth > -1.00 .AND. xl_temp.collevel = 0 .AND. **_xl_columns_**.hidden = 0

                                  FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" customWidth="1"')

                           CASE lnColWidth > -1.00 .AND. xl_temp.collevel = 0 .AND. **_xl_columns_**.hidden = 1

                                  FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" hidden="1" customWidth="1"')

                           CASE lnColWidth = -1.00 .AND. xl_temp.collevel > 0

                                  FWRITE(lhFile, ' outlineLevel="' + TRANSFORM(xl_temp.collevel) + '"/>')

                           CASE lnColWidth > -1.00 .AND. xl_temp.collevel > 0

                                  FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" customWidth="1" outlineLevel="' + TRANSFORM(xl_temp.collevel) + '"')

                   ENDCASE

Should be

                   DO CASE

                           CASE lnColWidth > -1.00 .AND. xl_temp.collevel = 0 .AND. **xl_temp**.hidden = 0

                                  FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" customWidth="1"')

                           CASE lnColWidth > -1.00 .AND. xl_temp.collevel = 0 .AND. **xl_temp**.hidden = 1

                                  FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" hidden="1" customWidth="1"')

                           CASE lnColWidth = -1.00 .AND. xl_temp.collevel > 0

                                  FWRITE(lhFile, ' outlineLevel="' + TRANSFORM(xl_temp.collevel) + '"/>')

                           CASE lnColWidth > -1.00 .AND. xl_temp.collevel > 0

                                  FWRITE(lhFile, ' width="' + TRANSFORM(lnColWidth) + '" customWidth="1" outlineLevel="' + TRANSFORM(xl_temp.collevel) + '"')

                   ENDCASE

— Reply to this email directly, view it on GitHubhttps://github.com/ggreen86/XLSX-Workbook-Class/issues/103, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AGWB33JWHCR5HCRCHKY6C73YKNYYBAVCNFSM6AAAAABA5SDQ7WVHI2DSMVQWIX3LMV43ASLTON2WKOZSGA2TCNBVGE2DEMA. You are receiving this because you are subscribed to this thread.Message ID: @.**@.>>

ggreen86 commented 8 months ago

Closing this issue; it is corrected in Release 40 (to be uploaded soon).