How to use the pylightxl.writexl.new_worksheet_text function in pylightxl

To help you get started, we’ve selected a few pylightxl examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github PydPiper / pylightxl / test / test_writexl.py View on Github external
xml_tag_si.format(space_preserve='xml:space="preserve"',val=' text6 ')

        db = Database()
        db.add_ws('Sheet1', {'A1': {'v': 'text1', 'f': '', 's': ''},
                             'A2': {'v': 'text2', 'f': '', 's': ''},
                             'A3': {'v': ' text3', 'f': '', 's': ''},
                             'A6': {'v': 'text4', 'f': '', 's': ''},
                             })

        db.add_ws('Sheet2', {'A4': {'v': 'text5 ', 'f': '', 's': ''},
                             'A5': {'v': ' text6 ', 'f': '', 's': ''},
                             'A6': {'v': 'text4', 'f': '', 's': ''},
                             })

        # process the sharedStrings, see dev note why this is done this way inside new_worksheet_text
        _ = new_worksheet_text(db, 'Sheet1')
        _ = new_worksheet_text(db, 'Sheet2')

        self.assertEqual(new_sharedStrings_text(db), xml_base.format(sharedString_len=6 ,many_tag_si=many_tag_si))
github PydPiper / pylightxl / test / test_writexl.py View on Github external
db = Database()
        db.add_ws('Sheet1', {'A1': {'v': 'text1', 'f': '', 's': ''},
                             'A2': {'v': 'text2', 'f': '', 's': ''},
                             'A3': {'v': ' text3', 'f': '', 's': ''},
                             'A6': {'v': 'text4', 'f': '', 's': ''},
                             })

        db.add_ws('Sheet2', {'A4': {'v': 'text5 ', 'f': '', 's': ''},
                             'A5': {'v': ' text6 ', 'f': '', 's': ''},
                             'A6': {'v': 'text4', 'f': '', 's': ''},
                             })

        # process the sharedStrings, see dev note why this is done this way inside new_worksheet_text
        _ = new_worksheet_text(db, 'Sheet1')
        _ = new_worksheet_text(db, 'Sheet2')

        self.assertEqual(new_sharedStrings_text(db), xml_base.format(sharedString_len=6 ,many_tag_si=many_tag_si))
github PydPiper / pylightxl / test / test_writexl.py View on Github external
xml_tag_cr.format(address='C3', str_option='t="s"', tag_formula='', val=1)

        many_tag_row = xml_tag_row.format(row_num=1,num_of_cr_tags=3,many_tag_cr=many_tag_cr_row1) + \
                       xml_tag_row.format(row_num=3,num_of_cr_tags=2,many_tag_cr=many_tag_cr_row3)

        uid = '2C7EE24B-C535-494D-AA97-0A61EE84BA40'
        sizeAddress = 'A1:C3'

        db = Database()
        db.add_ws('Sheet1', {'A1':{'v': 1, 'f': '', 's': ''},
                             'B1':{'v': 'text1', 'f': '', 's': ''},
                             'C1':{'v': '=A1+2', 'f': '', 's': ''},
                             'A3':{'v': 'text1', 'f': '', 's': ''},
                             'C3':{'v': 'text2', 'f': '', 's': ''}})

        self.assertEqual(new_worksheet_text(db, 'Sheet1'), xml_base.format(sizeAddress=sizeAddress,
                                                                           uid=uid,
                                                                           many_tag_row=many_tag_row))