| | |
| | | 数据导出工具 |
| | | """ |
| | | import json |
| | | import logging |
| | | import os |
| | | import time |
| | | |
| | |
| | | num_operate_map[ |
| | | code]) |
| | | if buy_index == data["index"]: |
| | | ws.write(index, 8, "{}-{}".format(d["index"], d["val"]["time"]), cancel_style) |
| | | break |
| | | try: |
| | | ws.write(index, 8, "{}-{}".format(d["index"], d["val"]["time"]), cancel_style) |
| | | break |
| | | except Exception as e: |
| | | logging.exception(e) |
| | | |
| | | ws.write(index, 3, "{}万".format(round(int(data["val"]["num"]) * float(data["val"]["price"]) / 100, 2)), style) |
| | | wb.save(file_name) |
| | |
| | | |
| | | |
| | | if __name__ == "__main__": |
| | | export_l2_excel("002178") |
| | | export_l2_excel("002207") |