AppleScript help

Hello everyone,

I would like to use AppleScript to transform a .csv file. To make things easier to understand, I'm attaching two files: 1- The original file in csv format 2- The file as I'd like it to look after I've run it through the script.

Here are the steps involved

1-Open the file in numbers (Note: the file is located in the download folder).

2-Delete the first 6 lines

3-Delete all font styles and cell colors

4-Combine all cells in the nature of operation column of the same operation belonging to the same date in the first cell of the operation, deleting all spaces in the text is not necessary for each operation.

5- Delete all empty lines.

I hope I've made my request clear. If any of you have the knowledge to do this, if it can be done at all, I'd be very grateful for their help in writing the script.

Thank you in advance.

AX ST STE ARN ;;;;;;
FR41 1234 1234 1234 1234 1234 123;Compte à moi;;;;;
CTE ENTR;;;;;;
Solde au;04/02/2025;;;;;
Solde;1234;EUR;;;;
;;;;;;
Date;Nature de l'opération;Débit;Crédit;Devise;Date de valeur;Libellé interbancaire
27/01/2025;VIR RECU    486453436;;1234,56;EUR;27/01/2025;AUTRES VIREMENTS RECUS
;DE: M. DUPONT;;;;;
;MOTIF: ..;;;;;
;REF: NOT PROVIDED;;;;;
27/01/2025;CARTE x1234;-12,96;;EUR;27/01/2025;FACTURES CARTES PAYEES
;COMMERCE ELECTRONIQUE;;;;;
27/01/2025;CARTE X1234 25/01 SUPERMARCHE;-12,89;;EUR;27/01/2025;FACTURES CARTES PAYEES
27/01/2025;CARTE x01234 25/01 SPORT 0074;-12,34;;EUR;27/01/2025;FACTURES CARTES PAYEES
28/01/2025;PRELEVEMENT EUROPEEN 123456789;-123,45;;EUR;28/01/2025;PRELEVEMENTS EUROPEENS EMIS
;DE: ELECTRICITE;;;;;
;ID: FR123456789;;;;;
;MOTIF: MONSIEUR DUPONT;;;;;
;12345 THE++JR1234567? 2025-;;;;;

Date;Nature de l'opération;Débit;Crédit;Devise;Date de valeur;Libellé interbancaire
27/01/2025;VIRRECU486453436DE:M.DUPONTMOTIF:..REF:NOTPROVIDED;;1234,56;EUR;27/01/2025;AUTRES VIREMENTS RECUS
27/01/2025;CARTEx1234COMMERCEELECTRONIQUE;-12,96;;EUR;27/01/2025;FACTURES CARTES PAYEES
27/01/2025;CARTEX123425/01SUPERMARCHE;-12,89;;EUR;27/01/2025;FACTURES CARTES PAYEES
27/01/2025;CARTEx0123425/01SPORT0074;-12,34;;EUR;27/01/2025;FACTURES CARTES PAYEES
28/01/2025;PRELEVEMENTEUROPEEN123456789DE:ELECTRICITEID:FR123456789MOTIF:MONSIEURDUPONT12345THE++JR1234567?2025-;-123,45;;EUR;28/01/2025;PRELEVEMENTS EUROPEENS EMIS
AppleScript help
 
 
Q