How can I split Excel Data into multiple workbooks/files based on rows in Excel?

Hi, every month I receive an excel file with more than 3000 rows, I need to split this file into multiple files, and each file can only have a maximum of 999 lines, can anyone help me?

ExampleExcel.xlsx (148.6 KB)

Hi @Israel_Silva

I have attached an workflow that will perform the split as per your requirement.

Split_Excel_Files.xaml (18.3 KB)

ExampleExcel.zip (235.0 KB)

Gave this error when opening the xml, could you send me your packages?

Hi @Israel_Silva

I have attached the project files.
My UiPath version is 2022.10.2

Split_Excel_Files.zip (6.2 KB)

21.10.8+Branch.support-v21.10.Sha.37003a9224c4c6dfbdd08c5252d45b44dc3e156e

The item ‘C:\Users\SRV_RPA01\Documents\UiPath\ReceitaFederal_Testes\Split_Excel_Files.xaml’ could not be opened: Document is invalid.

Cannot open item: UiPath.Studio.Contracts.RecoverableException: The item ‘C:\Users\SRV_RPA01\Documents\UiPath\ReceitaFederal_Testes\Split_Excel_Files.xaml’ could not be opened: Document is invalid.
—> RemoteException wrapping System.IO.InvalidDataException: Document is invalid
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.InitRootActivity(WorkflowDesigner designer, String filename)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.BuildInternal(DesignerEventsSubscriber eventsSubscriber, String workflowId, String fileName)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerBuilder.Build(DesignerEventsSubscriber eventsSubscriber, String workflowId, String fileName)
at UiPath.Studio.Plugin.Workflow.WorkflowHandling.DesignerWrapper.Load(String fileName)
at UiPath.Studio.Plugin.Workflow.Services.DesignerFileProjectEndpoint.<>c__DisplayClass5_0.<b__0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at UiPath.Studio.Plugin.Workflow.Services.DesignerFileProjectEndpoint.<>c__DisplayClass5_0.<b__0>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Shared.MVVM.Services.DispatcherService.d__15.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.Studio.Plugin.Workflow.Services.DesignerFileProjectEndpoint.d__5.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_3.<<-ctor>g__InvokeMethod|6>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_1.<<-ctor>g__HandleRequest|3>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Server.<>c__DisplayClass7_2.<<-ctor>b__5>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at UiPath.CoreIpc.Helpers.d__91.MoveNext() --- End of inner exception stack trace --- at UiPath.Studio.Core.Services.PersistableServiceBase3.OnOpenAsync(String path, IFactory2 resolvedFactory, IOpenOptions options) at UiPath.Studio.Shell.Services.DocumentService.OnOpenAsync(String path, IFactory2 resolvedFactory, IOpenOptions options)
at UiPath.Studio.Core.Services.PersistableServiceBase3.OpenAsync(OpenInformation openInfo) at UiPath.Studio.Shell.ViewModels.Project.Behaviors.FileProjectItemBehavior.ExecuteOpenAsync(IFileSystemProjectItemViewModel item) at UiPath.Studio.App.Desktop.MVVM.Commands.TaskCommand3.Execute(TExecuteParameter parameter, Boolean ignoreCanExecuteCheck)
at System.Threading.Tasks.Task.<>c.b__128_0(Object state)
at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler), HResult -2146233088

Hi @Israel_Silva

I have removed all unused dependencies, please use the main.xaml file

Split_Excel_Files.1.0.2.nupkg (26.7 KB)

Split_Excel_Files_1.0.2.zip (3.5 KB)

Thankyouuuuu!!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.