commit 67f3be69a08732f7727033e7d9b694f4024ce719 Author: serr Date: Sat Nov 23 12:01:14 2024 +0300 . diff --git a/.vs/poli/v17/.suo b/.vs/poli/v17/.suo new file mode 100644 index 0000000..eadb2a6 Binary files /dev/null and b/.vs/poli/v17/.suo differ diff --git a/poli.py b/poli.py new file mode 100644 index 0000000..7c01d27 --- /dev/null +++ b/poli.py @@ -0,0 +1,20 @@ +# -*- coding: cp1251 -*- + +import pandas as pd + +ROWS_PER_FILE = 199 + +df = pd.read_excel('FILENAME.xlsx') + +ROWS_PER_FILE = 199 +num_files = (len(df) // ROWS_PER_FILE) + (1 if len(df) % ROWS_PER_FILE > 0 else 0) + +for i in range(num_files): + start_row = i * ROWS_PER_FILE + end_row = start_row + ROWS_PER_FILE + df_subset = df.iloc[start_row:end_row] + + output_filename = f'File_{i + 1}.xlsx' + df_subset.to_excel(output_filename, index=False) + +print(f'Создано {num_files} файлов.') diff --git a/poli.pyproj b/poli.pyproj new file mode 100644 index 0000000..a7f70e7 --- /dev/null +++ b/poli.pyproj @@ -0,0 +1,35 @@ + + + Debug + 2.0 + 449a49cf-3fa1-4417-a668-4cb481f000d8 + . + poli.py + + + . + . + poli + poli + + + true + false + + + true + false + + + + + + + + + + + + \ No newline at end of file diff --git a/poli.sln b/poli.sln new file mode 100644 index 0000000..1af1c3b --- /dev/null +++ b/poli.sln @@ -0,0 +1,23 @@ +п»ї +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.3.32929.385 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{888888A0-9F3D-457C-B088-3A5042F75D52}") = "poli", "poli.pyproj", "{449A49CF-3FA1-4417-A668-4CB481F000D8}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {449A49CF-3FA1-4417-A668-4CB481F000D8}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {449A49CF-3FA1-4417-A668-4CB481F000D8}.Release|Any CPU.ActiveCfg = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {C80A78DE-CACB-4BBC-85C3-B0FEE3B2964B} + EndGlobalSection +EndGlobal