import os

from GTT import SPARKS
from GTT import excel as ew
from GTT import studBookStruct

TEST_DIR = os.path.dirname(__file__)
TEST_DATA_DIR = os.path.join(TEST_DIR, 'testData')

# my_sparks_reader = SPARKS.SPARKSReader("test/testData/test_sparks_data.dbf")
moves_data = os.path.join(TEST_DATA_DIR, 'test_moves_data.dbf')
my_sparks_reader = SPARKS.SPARKSReader(moves_data)
my_excel_writer = ew.ExcelWriter("test/testData/test_excel_write.xlsx")

my_studbook = studBookStruct.Studbook()

my_studbook.add_header(my_sparks_reader.get_header_as_list())
my_studbook.add_records_from_list(my_sparks_reader.get_records_as_list())

my_excel_writer.write_studbook(my_studbook)
my_excel_writer.close()



import os

from GTT import SPARKS
from GTT import excel as ew
from GTT import studBookStruct

TEST_DIR = os.path.dirname(__file__)
TEST_DATA_DIR = os.path.join(TEST_DIR, 'testData')

# my_sparks_reader = SPARKS.SPARKSReader("test/testData/test_sparks_data.dbf")
moves_data = os.path.join(TEST_DATA_DIR, 'test_moves_data.dbf')
my_sparks_reader = SPARKS.SPARKSReader(moves_data)
excel_write = os.path.join(TEST_DATA_DIR, 'test_excel_write.xlsx')
my_excel_writer = ew.ExcelWriter(excel_write)

my_studbook = studBookStruct.Studbook()

my_studbook.add_header(my_sparks_reader.get_header_as_list())
my_studbook.add_records_from_list(my_sparks_reader.get_records_as_list())

my_excel_writer.write_studbook(my_studbook)
my_excel_writer.close()



Use the correct excel path.
Use the correct excel path.

  import os
  
  from GTT import SPARKS
  from GTT import excel as ew
  from GTT import studBookStruct
  
  TEST_DIR = os.path.dirname(__file__)
  TEST_DATA_DIR = os.path.join(TEST_DIR, 'testData')
  
  # my_sparks_reader = SPARKS.SPARKSReader("test/testData/test_sparks_data.dbf")
  moves_data = os.path.join(TEST_DATA_DIR, 'test_moves_data.dbf')
  my_sparks_reader = SPARKS.SPARKSReader(moves_data)
+ excel_write = os.path.join(TEST_DATA_DIR, 'test_excel_write.xlsx')
- my_excel_writer = ew.ExcelWriter("test/testData/test_excel_write.xlsx")
+ my_excel_writer = ew.ExcelWriter(excel_write)
  
  my_studbook = studBookStruct.Studbook()
  
  my_studbook.add_header(my_sparks_reader.get_header_as_list())
  my_studbook.add_records_from_list(my_sparks_reader.get_records_as_list())
  
  my_excel_writer.write_studbook(my_studbook)
  my_excel_writer.close()
  
  
  
Use the correct excel path.
## Code Before:
import os

from GTT import SPARKS
from GTT import excel as ew
from GTT import studBookStruct

TEST_DIR = os.path.dirname(__file__)
TEST_DATA_DIR = os.path.join(TEST_DIR, 'testData')

# my_sparks_reader = SPARKS.SPARKSReader("test/testData/test_sparks_data.dbf")
moves_data = os.path.join(TEST_DATA_DIR, 'test_moves_data.dbf')
my_sparks_reader = SPARKS.SPARKSReader(moves_data)
my_excel_writer = ew.ExcelWriter("test/testData/test_excel_write.xlsx")

my_studbook = studBookStruct.Studbook()

my_studbook.add_header(my_sparks_reader.get_header_as_list())
my_studbook.add_records_from_list(my_sparks_reader.get_records_as_list())

my_excel_writer.write_studbook(my_studbook)
my_excel_writer.close()



## Instruction:
Use the correct excel path.
## Code After:
import os

from GTT import SPARKS
from GTT import excel as ew
from GTT import studBookStruct

TEST_DIR = os.path.dirname(__file__)
TEST_DATA_DIR = os.path.join(TEST_DIR, 'testData')

# my_sparks_reader = SPARKS.SPARKSReader("test/testData/test_sparks_data.dbf")
moves_data = os.path.join(TEST_DATA_DIR, 'test_moves_data.dbf')
my_sparks_reader = SPARKS.SPARKSReader(moves_data)
excel_write = os.path.join(TEST_DATA_DIR, 'test_excel_write.xlsx')
my_excel_writer = ew.ExcelWriter(excel_write)

my_studbook = studBookStruct.Studbook()

my_studbook.add_header(my_sparks_reader.get_header_as_list())
my_studbook.add_records_from_list(my_sparks_reader.get_records_as_list())

my_excel_writer.write_studbook(my_studbook)
my_excel_writer.close()


