def __init__(self, file, ignore_sheets = [], ignore_hidden = False, debug = False): # print("___### Initializing Excel Compiler ###___") file_name = os.path.abspath(file) # Decompose subfiles structure in zip file archive = read_archive(file_name) # Parse cells self.cells = read_cells(archive, ignore_sheets, ignore_hidden) # Parse named_range { name (ExampleName) -> address (Sheet!A1:A10)} self.named_ranges = read_named_ranges(archive) self.Range = RangeFactory(self.cells) self.pointers = set() self.debug = debug
def __init__(self, file, ignore_sheets=[], ignore_hidden=False, debug=False): print "___### Initializing Excel Compiler ###___" file_name = os.path.abspath(file) # Decompose subfiles structure in zip file archive = read_archive(file_name) # Parse cells self.cells = read_cells(archive, ignore_sheets, ignore_hidden) # Parse named_range { name (ExampleName) -> address (Sheet!A1:A10)} self.named_ranges = read_named_ranges(archive) self.Range = RangeFactory(self.cells) self.pointers = set() self.debug = debug
def from_file_name(cls, file, ignore_sheets=[], ignore_hidden=False, debug=False, excel_compiler=False): file_name = os.path.abspath(file) # Decompose subfiles structure in zip file archive = read_archive(file_name) # Parse cells cells = read_cells(archive, ignore_sheets, ignore_hidden) # Parse named_range { name (ExampleName) -> address (Sheet!A1:A10)} named_ranges = read_named_ranges(archive) debug = debug return cls(networkx.DiGraph(), cellmap=cells, named_ranges=named_ranges, pointers=set(), debug=debug, excel_compiler=excel_compiler)
def setUp(self): file_name = os.path.abspath("./tests/files/SharedFormula.xlsx") archive = read_archive(file_name) self.cells = read_cells(archive)