投稿

6月, 2023の投稿を表示しています

てきとーに処理をする(入力フォームは考え始めるとあっちこっちに)

  import PySimpleGUI as sg import sqlite3 import datetime import openpyxl as op import pandas as pd db_name     = "test.db" connection   = sqlite3 . connect ( db_name ) query = ( f 'select sum(receipt_Money) as 合計 from omimai' ) df = pd . read_sql ( query , connection ) df2 = df . to_string ( index = False ) saaa = df2 . replace ( '合計' , '' ) saaa = saaa . replace ( ' \n ' , '' ) saaa = saaa . replace ( ' ' , '' ) sg . theme ( 'BluePurple' ) layout = [           [[ sg . Text ( '金額(1,000)' ), sg . Input ( key = '-Money-' , default_text = '0' , size = ( 6 , 1 ))],           [ sg . Text ( '姓' ), sg . Input ( key = '-Lname-' ), sg . Text ( '名' ), sg . Input ( key = '-Fname-' )],           [[ sg . Text ( '住所' ), sg . Input ( key = '-Address-' )],           [ sg . Text ( '法人名' ), sg . Input ( key = '-Company-...