Passer au contenu du pied de page
UTILISATION D'IRONXL

Conversion de fichiers CSV en XLSX avec C# : conversion de fichiers CSV au format Excel

La conversion des fichiers CSV au format XLSX permet d'accéder à des fonctionnalités de tableur que les fichiers CSV ne peuvent tout simplement pas offrir. Alors que le format CSV stocke des données tabulaires brutes, le format XLSX d'Excel prend en charge les formules, les feuilles de calcul multiples, les graphiques, la mise en forme des cellules et la validation des données — des fonctionnalités essentielles pour les applications professionnelles modernes. Avec la bibliothèque appropriée, le processus de conversion est simple et ne nécessite que quelques lignes de code C#.

IronXL est une bibliothèque .NET qui gère directement cette conversion, sans nécessiter Microsoft Office ni le kit de développement logiciel Open XML. Il lit le fichier CSV source, analyse les données délimitées et écrit un classeur XLSX entièrement conforme. Installez le package via NuGet et démarrez un essai gratuit pour suivre les exemples de code ci-dessous.

Comment convertir des fichiers CSV au format XLSX en C# ?

La conversion principale nécessite le chargement du fichier CSV et son enregistrement au format Excel. IronXL fournit WorkBook.LoadCSV, qui analyse la source délimitée et crée un classeur prêt pour l'exportation. La méthode accepte le chemin d'accès au fichier, le format Excel cible et le caractère de délimitation.

using IronXL;

// Load CSV file and convert to XLSX format
WorkBook workbook = WorkBook.LoadCSV("data.csv", fileFormat: ExcelFileFormat.XLSX, ListDelimiter: ",");

// Access the default worksheet containing CSV data
WorkSheet worksheet = workbook.DefaultWorkSheet;

// Save as Excel XLSX file
workbook.SaveAs("output.xlsx");
using IronXL;

// Load CSV file and convert to XLSX format
WorkBook workbook = WorkBook.LoadCSV("data.csv", fileFormat: ExcelFileFormat.XLSX, ListDelimiter: ",");

// Access the default worksheet containing CSV data
WorkSheet worksheet = workbook.DefaultWorkSheet;

// Save as Excel XLSX file
workbook.SaveAs("output.xlsx");
Imports IronXL

' Load CSV file and convert to XLSX format
Dim workbook As WorkBook = WorkBook.LoadCSV("data.csv", fileFormat:=ExcelFileFormat.XLSX, ListDelimiter:=",")

' Access the default worksheet containing CSV data
Dim worksheet As WorkSheet = workbook.DefaultWorkSheet

' Save as Excel XLSX file
workbook.SaveAs("output.xlsx")
$vbLabelText   $csharpLabel

Sortie

C# CSV vers XLSX : Guide complet du développeur : Image 1 - Exemple de sortie pour la conversion CSV vers Excel

La méthode LoadCSV accepte trois paramètres clés : le nom du fichier, la constante de format Excel cible et le délimiteur de liste utilisé dans le fichier source. Cette approche préserve toutes les données textuelles et numériques de la feuille CSV d'origine tout en créant un fichier XLSX correctement structuré. La classe WorkBook centralise toutes les opérations sur la feuille de calcul. Une fois chargées, les données CSV deviennent accessibles via des feuilles de calcul, permettant une manipulation plus poussée avant l'enregistrement du fichier Excel final.

Pour charger des fichiers XLSX existants au lieu de CSV, utilisez WorkBook.Load("file.xlsx") qui détecte automatiquement le format à partir de l'extension du fichier. Cela simplifie la création de pipelines qui acceptent des entrées CSV ou Excel et les normalisent en un seul format de sortie.

Quels sont les avantages de convertir un fichier CSV au format Excel ?

Le format XLSX offre des avantages mesurables par rapport au format CSV simple pour la plupart des scénarios de gestion de données :

  • Plusieurs feuilles de calcul : les fichiers Excel prennent en charge plusieurs feuilles au sein d'un même classeur, permettant un stockage organisé des données que les fichiers CSV ne peuvent égaler. Un seul fichier XLSX peut contenir des dizaines de feuilles de calcul couvrant différentes périodes, régions ou catégories.
  • Prise en charge des formules : Saisissez directement dans les cellules des calculs complexes, des agrégations et une logique conditionnelle. Les formules Excel se recalculent automatiquement lorsque les données sources changent, ce qui élimine la nécessité de retraiter manuellement les fichiers CSV.
  • Graphiques visuels : Créez des graphiques à barres, des graphiques linéaires, des graphiques circulaires et d'autres visualisations à partir des données de la feuille de calcul. IronXL prend en charge la création de graphiques directement via l'API, de sorte que les graphiques sont intégrés dans le fichier XLSX.
  • Mise en forme des cellules : Contrôlez les polices, les couleurs, les bordures et les formats numériques pour les documents Professional . Les fichiers CSV ne stockent que des valeurs brutes ; XLSX préserve la couche d'affichage en même temps que les données.
  • Validation des données : Limiter la saisie dans les cellules à des valeurs ou des plages spécifiques, afin d'éviter les erreurs de saisie de données dans les fichiers partagés avec les utilisateurs finaux.
  • Protection par mot de passe : Protégez les feuilles de calcul et les classeurs par des mots de passe pour contrôler l'accès en lecture et en écriture, une fonctionnalité totalement absente du format CSV.

Ces fonctionnalités font du format XLSX le choix standard pour les rapports, les tableaux de bord, les modèles financiers et toute application nécessitant plus qu'un simple stockage de données brutes.

Comment installer IronXL dans un projet .NET ?

IronXL est distribué sous forme de package NuGet . Installez-le depuis la console du gestionnaire de packages dans Visual Studio :

Install-Package IronXl
Install-Package IronXl
SHELL

Ou en utilisant l'interface de ligne de commande .NET :

dotnet add package IronXl
dotnet add package IronXl
SHELL

Après l'installation, ajoutez using IronXL; à n'importe quel fichier qui fonctionne avec des feuilles de calcul. Ce package cible .NET Framework 4.6.2+, .NET Core 3.1+, .NET 5 à .NET 10 et prend en charge les environnements de déploiement Windows, Linux, macOS, Docker et Azure.

Aucune dépendance d'exécution supplémentaire ni installation de Microsoft Office ne sont requises. IronXL lit et écrit les fichiers XLSX à l'aide de son propre analyseur et générateur, ce qui le rend adapté aux déploiements côté serveur et sans interface graphique où Office ne peut pas être installé.

Comment gérez-vous l'encodage CSV lors de la conversion ?

De nombreux fichiers CSV proviennent de systèmes anciens, de bases de données internationales ou d'exportations tierces qui utilisent des caractères non ASCII. Un encodage correct garantit que les caractères spéciaux et le texte international restent intacts dans le fichier XLSX résultant.

using IronXL;
using System.Text;

// Load CSV with explicit encoding specification
WorkBook workbook = WorkBook.LoadCSV("international-data.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",",
    encoding: Encoding.UTF8);

// Access the worksheet containing the encoded data
WorkSheet sheet = workbook.DefaultWorkSheet;

// Inspect a cell to verify encoding was preserved
string cellValue = sheet["A1"].StringValue;

// Save the converted Excel file
workbook.SaveAs("encoded-output.xlsx");
using IronXL;
using System.Text;

// Load CSV with explicit encoding specification
WorkBook workbook = WorkBook.LoadCSV("international-data.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",",
    encoding: Encoding.UTF8);

// Access the worksheet containing the encoded data
WorkSheet sheet = workbook.DefaultWorkSheet;

// Inspect a cell to verify encoding was preserved
string cellValue = sheet["A1"].StringValue;

// Save the converted Excel file
workbook.SaveAs("encoded-output.xlsx");
IRON VB CONVERTER ERROR developers@ironsoftware.com
$vbLabelText   $csharpLabel

Fichier XLSX de sortie

C# CSV vers XLSX : Guide complet du développeur : Image 2 - Conversion CSV vers XLSX avec prise en charge de tous les encodages

IronXL détecte automatiquement les formats d'encodage courants, notamment UTF-8, pour la plupart des fichiers CSV standard. Pour les fichiers avec un encodage non standard tel que Windows-1252, ISO-8859-1 ou Shift-JIS, transmettez l'instance System.Text.Encoding à l'appel LoadCSV. La documentation de la classe Encoding sur Microsoft Learn répertorie tous les noms d'encodage pris en charge.

Lors de la récupération de données CSV à partir d'un serveur distant, utilisez HttpClient pour télécharger le flux, l'enregistrer en tant que fichier temporaire, puis le charger via LoadCSV. Ce modèle fonctionne dans les applications .NET hébergées dans le cloud où les fichiers CSV arrivent sous forme de réponses HTTP provenant d'API tierces.

Comment appliquer une mise en forme des cellules après une conversion CSV ?

Les données CSV brutes ne contiennent aucune information de formatage. Après la conversion au format XLSX, appliquez les formats de nombres, les polices et les couleurs d'arrière-plan pour rendre la feuille de calcul lisible et Professional.

using IronXL;
using IronXl.Styles;

// Load CSV data
WorkBook workbook = WorkBook.LoadCSV("sales-report.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

WorkSheet sheet = workbook.DefaultWorkSheet;

// Format the header row with bold text and background color
Range headerRow = sheet["A1:Z1"];
headerRow.Style.Font.Bold = true;
headerRow.Style.SetBackgroundColor("#4472C4");
headerRow.Style.Font.Color = "#FFFFFF";

// Apply currency format to a numeric column
Range priceColumn = sheet["C2:C100"];
priceColumn.Style.NumberFormat = "$#,##0.00";

// Auto-fit column widths for readability
sheet.AutoSizeColumn(0);
sheet.AutoSizeColumn(1);
sheet.AutoSizeColumn(2);

workbook.SaveAs("formatted-report.xlsx");
using IronXL;
using IronXl.Styles;

// Load CSV data
WorkBook workbook = WorkBook.LoadCSV("sales-report.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

WorkSheet sheet = workbook.DefaultWorkSheet;

// Format the header row with bold text and background color
Range headerRow = sheet["A1:Z1"];
headerRow.Style.Font.Bold = true;
headerRow.Style.SetBackgroundColor("#4472C4");
headerRow.Style.Font.Color = "#FFFFFF";

// Apply currency format to a numeric column
Range priceColumn = sheet["C2:C100"];
priceColumn.Style.NumberFormat = "$#,##0.00";

// Auto-fit column widths for readability
sheet.AutoSizeColumn(0);
sheet.AutoSizeColumn(1);
sheet.AutoSizeColumn(2);

workbook.SaveAs("formatted-report.xlsx");
Imports IronXL
Imports IronXl.Styles

' Load CSV data
Dim workbook As WorkBook = WorkBook.LoadCSV("sales-report.csv", fileFormat:=ExcelFileFormat.XLSX, ListDelimiter:=",")

Dim sheet As WorkSheet = workbook.DefaultWorkSheet

' Format the header row detecting bold header detecting bold detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting bold text detecting
$vbLabelText   $csharpLabel

IronXL expose le style des cellules et des plages via la propriété Style, qui reflète les options de mise en forme disponibles dans l'interface utilisateur d'Excel. Les formats numériques suivent la syntaxe de format numérique Excel documentée par Microsoft . La méthode SetBackgroundColor accepte les chaînes de couleurs hexadécimales, ce qui simplifie l'application des couleurs de marque aux rapports générés. Consultez la documentation complète de l'API de mise en forme des cellules pour connaître les propriétés de style disponibles.

Comment ajouter des graphiques après la conversion de données CSV ?

Une fois les données CSV présentes dans un classeur Excel, IronXL permet de créer des graphiques directement à partir de ces données. Les graphiques transforment les données brutes en informations visuelles sans nécessiter l'installation de Microsoft Excel sur le serveur.

using IronXL;
using IronXl.Drawing.Charts;

// Load CSV and convert to Excel format
WorkBook workbook = WorkBook.LoadCSV("sales-data.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

WorkSheet worksheet = workbook.DefaultWorkSheet;

// Create a column chart from the converted CSV data
IChart chart = worksheet.CreateChart(ChartType.Column, 10, 0, 25, 10);

// Add data series from the worksheet ranges
IChartSeries series = chart.AddSeries("A2:A10", "B2:B10");
series.Title = "Monthly Sales";

// Configure chart appearance
chart.SetTitle("Sales Performance");
chart.SetLegendPosition(LegendPosition.Bottom);

// Plot the chart and save the workbook
chart.Plot();
workbook.SaveAs("sales-with-chart.xlsx");
using IronXL;
using IronXl.Drawing.Charts;

// Load CSV and convert to Excel format
WorkBook workbook = WorkBook.LoadCSV("sales-data.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

WorkSheet worksheet = workbook.DefaultWorkSheet;

// Create a column chart from the converted CSV data
IChart chart = worksheet.CreateChart(ChartType.Column, 10, 0, 25, 10);

// Add data series from the worksheet ranges
IChartSeries series = chart.AddSeries("A2:A10", "B2:B10");
series.Title = "Monthly Sales";

// Configure chart appearance
chart.SetTitle("Sales Performance");
chart.SetLegendPosition(LegendPosition.Bottom);

// Plot the chart and save the workbook
chart.Plot();
workbook.SaveAs("sales-with-chart.xlsx");
Imports IronXL
Imports IronXl.Drawing.Charts

' Load CSV and convert to Excel format
Dim workbook As WorkBook = WorkBook.LoadCSV("sales-data.csv", fileFormat:=ExcelFileFormat.XLSX, ListDelimiter:=",")

Dim worksheet As WorkSheet = workbook.DefaultWorkSheet

' Create a column chart from the converted CSV data
Dim chart As IChart = worksheet.CreateChart(ChartType.Column, 10, 0, 25, 10)

' Add data series from the worksheet ranges
Dim series As IChartSeries = chart.AddSeries("A2:A10", "B2:B10")
series.Title = "Monthly Sales"

' Configure chart appearance
chart.SetTitle("Sales Performance")
chart.SetLegendPosition(LegendPosition.Bottom)

' Plot the chart and save the workbook
chart.Plot()
workbook.SaveAs("sales-with-chart.xlsx")
$vbLabelText   $csharpLabel

Sortie

C# CSV vers XLSX : Guide complet du développeur : Image 3 - Sortie pour la conversion d'un fichier CSV en un fichier Excel avec graphique

La méthode CreateChart accepte le type de graphique et quatre paramètres de positionnement (ligne du haut, colonne de gauche, ligne du bas, colonne de droite). La méthode AddSeries relie les plages de cellules de la feuille de calcul aux axes du graphique, créant des visualisations dynamiques qui se mettent à jour lorsque les données sous-jacentes changent. IronXL prend en charge les types de graphiques à colonnes, à barres, à lignes, à aires et circulaires via l'énumération ChartType. Pour obtenir la liste complète des configurations de graphiques prises en charge, consultez le tutoriel sur les graphiques IronXL .

Comment convertir un fichier CSV en DataTable puis en Excel ?

Pour les scénarios nécessitant une manipulation des données avant l'exportation, la conversion des données CSV via un DataTable offre une flexibilité maximale. Cette approche permet aux développeurs de filtrer, transformer, trier ou valider les lignes pendant le processus de conversion en utilisant les modèles d'accès aux données .NET standard.

using IronXL;
using System.Data;

// Load CSV file into workbook
WorkBook sourceWorkbook = WorkBook.LoadCSV("input.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

// Convert worksheet to DataTable for manipulation
DataTable table = sourceWorkbook.DefaultWorkSheet.ToDataTable(true);

// Filter rows -- keep only rows where the third column value is greater than 100
DataRow[] filtered = table.Select("Column3 > 100");
DataTable filteredTable = filtered.Length > 0 ? filtered.CopyToDataTable() : table.Clone();

// Create new workbook from modified data
WorkBook outputWorkbook = WorkBook.Create(ExcelFileFormat.XLSX);
WorkSheet outputSheet = outputWorkbook.CreateWorkSheet("Processed Data");

// Import filtered DataTable back into Excel
outputSheet.LoadFromDataTable(filteredTable, true);

// Save the final XLSX file
outputWorkbook.SaveAs("processed-output.xlsx");
using IronXL;
using System.Data;

// Load CSV file into workbook
WorkBook sourceWorkbook = WorkBook.LoadCSV("input.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

// Convert worksheet to DataTable for manipulation
DataTable table = sourceWorkbook.DefaultWorkSheet.ToDataTable(true);

// Filter rows -- keep only rows where the third column value is greater than 100
DataRow[] filtered = table.Select("Column3 > 100");
DataTable filteredTable = filtered.Length > 0 ? filtered.CopyToDataTable() : table.Clone();

// Create new workbook from modified data
WorkBook outputWorkbook = WorkBook.Create(ExcelFileFormat.XLSX);
WorkSheet outputSheet = outputWorkbook.CreateWorkSheet("Processed Data");

// Import filtered DataTable back into Excel
outputSheet.LoadFromDataTable(filteredTable, true);

// Save the final XLSX file
outputWorkbook.SaveAs("processed-output.xlsx");
Imports IronXL
Imports System.Data

' Load CSV file into workbook
Dim sourceWorkbook As WorkBook = WorkBook.LoadCSV("input.csv", fileFormat:=ExcelFileFormat.XLSX, ListDelimiter:=",")

' Convert worksheet to DataTable for manipulation
Dim table As DataTable = sourceWorkbook.DefaultWorkSheet.ToDataTable(True)

' Filter rows -- keep only rows where the third column value is greater than 100
Dim filtered As DataRow() = table.Select("Column3 > 100")
Dim filteredTable As DataTable = If(filtered.Length > 0, filtered.CopyToDataTable(), table.Clone())

' Create new workbook from modified data
Dim outputWorkbook As WorkBook = WorkBook.Create(ExcelFileFormat.XLSX)
Dim outputSheet As WorkSheet = outputWorkbook.CreateWorkSheet("Processed Data")

' Import filtered DataTable back into Excel
outputSheet.LoadFromDataTable(filteredTable, True)

' Save the final XLSX file
outputWorkbook.SaveAs("processed-output.xlsx")
$vbLabelText   $csharpLabel

Sortie

C# CSV vers XLSX : Guide complet du développeur : Image 4 - Conversion CSV vers DataTable puis sortie XLSX

La méthode ToDataTable exporte les données de la feuille de calcul vers un .NET DataTable, avec le paramètre booléen contrôlant si la première ligne est traitée comme en-têtes de colonne. LoadFromDataTable réimporte les données, en écrivant les en-têtes de colonnes comme première ligne lorsque le deuxième paramètre est true. Cette conversion bidirectionnelle permet une utilisation complète des opérations LINQ et .NET entre l'ingestion de fichiers CSV et la sortie Excel. Consultez la documentation IronXL DataTable pour connaître les options supplémentaires.

Comment enregistrer un fichier XLSX dans un flux plutôt que dans un chemin de fichier ?

Les applications côté serveur ont souvent besoin de transmettre les fichiers Excel directement dans les réponses HTTP plutôt que d'écrire des fichiers temporaires sur le disque. IronXL prend en charge l'enregistrement des classeurs sous MemoryStream à cette fin.

using IronXL;
using System.IO;

// Load and convert CSV data
WorkBook workbook = WorkBook.LoadCSV("report-data.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

WorkSheet sheet = workbook.DefaultWorkSheet;

// Save workbook to a memory stream instead of a file
using MemoryStream stream = new MemoryStream();
workbook.SaveAs(stream);

// Reset stream position for reading
stream.Position = 0;

// The stream is now ready to pass to an HTTP response, upload to cloud storage,
// or attach to an email. For ASP.NET Core:
// return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "report.xlsx");

// Write bytes to verify stream contains XLSX data
byte[] xlsxBytes = stream.ToArray();
Console.WriteLine($"Generated XLSX size: {xlsxBytes.Length} bytes");
using IronXL;
using System.IO;

// Load and convert CSV data
WorkBook workbook = WorkBook.LoadCSV("report-data.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

WorkSheet sheet = workbook.DefaultWorkSheet;

// Save workbook to a memory stream instead of a file
using MemoryStream stream = new MemoryStream();
workbook.SaveAs(stream);

// Reset stream position for reading
stream.Position = 0;

// The stream is now ready to pass to an HTTP response, upload to cloud storage,
// or attach to an email. For ASP.NET Core:
// return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "report.xlsx");

// Write bytes to verify stream contains XLSX data
byte[] xlsxBytes = stream.ToArray();
Console.WriteLine($"Generated XLSX size: {xlsxBytes.Length} bytes");
Imports IronXL
Imports System.IO

' Load and convert CSV data
Dim workbook As WorkBook = WorkBook.LoadCSV("report-data.csv", fileFormat:=ExcelFileFormat.XLSX, ListDelimiter:=",")

Dim sheet As WorkSheet = workbook.DefaultWorkSheet

' Save workbook to a memory stream instead of a file
Using stream As New MemoryStream()
    workbook.SaveAs(stream)

    ' Reset stream position for reading
    stream.Position = 0

    ' The stream is now ready to pass to an HTTP response, upload to cloud storage,
    ' or attach to an email. For ASP.NET Core:
    ' Return File(stream, "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "report.xlsx")

    ' Write bytes to verify stream contains XLSX data
    Dim xlsxBytes As Byte() = stream.ToArray()
    Console.WriteLine($"Generated XLSX size: {xlsxBytes.Length} bytes")
End Using
$vbLabelText   $csharpLabel

L'enregistrement dans un flux évite les opérations de lecture/écriture sur disque et élimine la nécessité de nettoyer les fichiers temporaires. Ce modèle est largement utilisé dans les points de terminaison de téléchargement de fichiers ASP.NET Core où le fichier XLSX est généré à la demande. La surcharge SaveAs(Stream) écrit une archive XLSX complète et valide sur n'importe quelle instance de flux inscriptible.

Comment travailler avec plusieurs feuilles de calcul dans un classeur converti ?

Un seul classeur XLSX peut contenir plusieurs feuilles de calcul. Après la conversion d'un fichier CSV, le classeur contient par défaut une seule feuille. Des feuilles supplémentaires peuvent être créées par programmation pour organiser les données connexes.

using IronXL;

// Load primary CSV data
WorkBook workbook = WorkBook.LoadCSV("quarterly-data.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

// Rename the default sheet created from the CSV
WorkSheet q1Sheet = workbook.DefaultWorkSheet;
q1Sheet.Name = "Q1 Data";

// Create additional worksheets for summary information
WorkSheet summarySheet = workbook.CreateWorkSheet("Summary");

// Write summary headers and formulas
summarySheet["A1"].Value = "Total Records";
summarySheet["B1"].Formula = $"=COUNTA('{q1Sheet.Name}'!A:A)-1";

summarySheet["A2"].Value = "Data Sheet";
summarySheet["B2"].Value = q1Sheet.Name;

// Save the multi-sheet workbook
workbook.SaveAs("multi-sheet-report.xlsx");
using IronXL;

// Load primary CSV data
WorkBook workbook = WorkBook.LoadCSV("quarterly-data.csv",
    fileFormat: ExcelFileFormat.XLSX,
    ListDelimiter: ",");

// Rename the default sheet created from the CSV
WorkSheet q1Sheet = workbook.DefaultWorkSheet;
q1Sheet.Name = "Q1 Data";

// Create additional worksheets for summary information
WorkSheet summarySheet = workbook.CreateWorkSheet("Summary");

// Write summary headers and formulas
summarySheet["A1"].Value = "Total Records";
summarySheet["B1"].Formula = $"=COUNTA('{q1Sheet.Name}'!A:A)-1";

summarySheet["A2"].Value = "Data Sheet";
summarySheet["B2"].Value = q1Sheet.Name;

// Save the multi-sheet workbook
workbook.SaveAs("multi-sheet-report.xlsx");
Imports IronXL

' Load primary CSV data
Dim workbook As WorkBook = WorkBook.LoadCSV("quarterly-data.csv", fileFormat:=ExcelFileFormat.XLSX, ListDelimiter:=",")

' Rename the default sheet created from the CSV
Dim q1Sheet As WorkSheet = workbook.DefaultWorkSheet
q1Sheet.Name = "Q1 Data"

' Create additional worksheets for summary information
Dim summarySheet As WorkSheet = workbook.CreateWorkSheet("Summary")

' Write summary headers and formulas
summarySheet("A1").Value = "Total Records"
summarySheet("B1").Formula = $"=COUNTA('{q1Sheet.Name}'!A:A)-1"

summarySheet("A2").Value = "Data Sheet"
summarySheet("B2").Value = q1Sheet.Name

' Save the multi-sheet workbook
workbook.SaveAs("multi-sheet-report.xlsx")
$vbLabelText   $csharpLabel

La méthode CreateWorkSheet ajoute une nouvelle feuille vide au classeur. Les feuilles sont accessibles par nom ou par index via workbook.WorkSheets. Les références de formules inter-feuilles utilisent la notation Excel standard 'SheetName'!CellRef. Pour en savoir plus sur les opérations sur plusieurs feuilles, consultez le guide IronXL sur les opérations sur plusieurs feuilles .

Quelles sont vos prochaines étapes ?

La conversion de fichiers CSV en XLSX en C# avec IronXL ne nécessite que quelques lignes de code et produit un classeur Excel entièrement conforme sans aucune dépendance à Microsoft Office. Les exemples ci-dessus couvrent l'intégralité du flux de travail : du chargement et de l'enregistrement de base des fichiers CSV à la gestion de l'encodage, la mise en forme des cellules, la création de graphiques, l'intégration de DataTable, la sortie en flux et les classeurs à plusieurs feuilles.

Principales fonctionnalités abordées dans ce guide :

  • Conversion basique de fichiers CSV en XLSX avec WorkBook.LoadCSV et SaveAs
  • Spécification d'encodage pour les jeux de caractères internationaux
  • Mise en forme des cellules et des plages appliquée après la conversion
  • Création de graphiques directement intégrée au fichier XLSX
  • Aller-retour DataTable pour les données filtrées et transformées
  • Sortie MemoryStream pour la distribution de fichiers côté serveur
  • Création d'un classeur à plusieurs feuilles à partir d'une seule source CSV

IronXL prend en charge les déploiements Windows, Linux, macOS, Docker et Azure sur .NET Framework, .NET Core et .NET 5 à 10. Pour découvrir davantage de fonctionnalités, consultez la documentation IronXL , parcourez la référence des objets de l'API Excel ou consultez les guides pratiques d' IronXL pour des sujets tels que la lecture de fichiers Excel , la fusion de cellules et l'application de formules . Téléchargez une version d'essai gratuite pour tester toutes les fonctionnalités dans un environnement de développement, ou achetez une licence pour un déploiement en production.

Commencez avec IronXL maintenant.
green arrow pointer

Questions Fréquemment Posées

Comment convertir un fichier CSV en XLSX en C# sans Microsoft Office ?

Utilisez la méthode WorkBook.LoadCSV d'IronXL pour charger le fichier CSV, puis appelez workbook.SaveAs('output.xlsx') pour enregistrer le fichier XLSX. IronXL ne nécessite ni Microsoft Office ni le kit de développement logiciel Open XML ; il lit et écrit les fichiers Excel grâce à son propre analyseur syntaxique.

Quel package NuGet est utilisé pour convertir un fichier CSV en Excel en C# ?

Installez le package NuGet IronXL à l'aide de la commande « Install-Package IronXL» dans Visual Studio ou de la commande « dotnet add package IronXL» depuis l'interface de ligne de commande .NET . Ce package est compatible avec .NET Framework 4.6.2 et versions ultérieures, ainsi qu'avec toutes les versions de .NET Core et .NET 5 à 10.

Comment spécifier le délimiteur lors du chargement d'un fichier CSV avec IronXL?

Transmettez le paramètre ListDelimiter à WorkBook.LoadCSV, par exemple : WorkBook.LoadCSV('data.csv', fileFormat: ExcelFileFormat.XLSX, ListDelimiter: ',') pour les fichiers séparés par des virgules ou ListDelimiter: ';' pour les fichiers séparés par des points-virgules.

IronXL peut-il gérer les fichiers CSV contenant des caractères non ASCII ou internationaux ?

Oui. Transmettez une instance de System.Text.Encoding au paramètre encoding de LoadCSV. IronXL détecte automatiquement l'UTF-8 pour la plupart des fichiers standard. Pour Windows-1252, ISO-8859-1 ou d'autres encodages, spécifiez-les explicitement afin de préserver les caractères internationaux.

Comment ajouter un graphique à un fichier Excel généré à partir de données CSV en utilisant IronXL?

Après avoir chargé le fichier CSV, appelez la méthode `worksheet.CreateChart(ChartType.Column, top, left, bottom, right)` pour créer un graphique, puis utilisez `chart.AddSeries` pour lier les plages de cellules, et enfin, appelez `chart.Plot()` avant d'enregistrer. IronXL prend en charge les graphiques à colonnes, à barres, linéaires, en aires et circulaires.

Comment enregistrer un fichier XLSX généré dans un MemoryStream pour la réponse HTTP dans ASP.NET Core?

Appelez workbook.SaveAs(stream) où stream est une instance de MemoryStream, puis réinitialisez stream.Position à 0 avant de le retourner. Dans un contrôleur ASP.NET Core , retournez File(stream, 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'report.xlsx').

IronXL peut-il convertir des données CSV en DataTable avant de les écrire dans Excel ?

Oui. Chargez le fichier CSV avec LoadCSV, puis appelez workbook.DefaultWorkSheet.ToDataTable(true) pour l'exporter vers un DataTable. Après avoir filtré ou transformé les données, créez un nouveau classeur et appelez outputSheet.LoadFromDataTable(table, true) pour importer les données modifiées.

IronXL prend-il en charge plusieurs feuilles de calcul lors de la conversion à partir de fichiers CSV ?

Oui. Après le chargement d'un fichier CSV, le classeur contient une feuille par défaut. Appelez la méthode `workbook.CreateWorkSheet('NomDeLaFeuille')` pour ajouter d'autres feuilles. Les feuilles peuvent être liées entre elles à l'aide de la syntaxe standard des formules inter-feuilles d'Excel.

Quelles versions et plateformes .NET IronXL prend-il en charge ?

IronXL prend en charge .NET Framework 4.6.2 et versions ultérieures, .NET Core 3.1 et .NET 5 à .NET 10. Il fonctionne sous Windows, Linux, macOS, Docker et Azure, ce qui le rend adapté aux déploiements côté bureau et côté serveur.

Comment appliquer une mise en forme des cellules, comme les titres en gras et les formats numériques, après une conversion CSV ?

Après avoir chargé le fichier CSV, accédez à la plage A1:Z1 via la feuille de calcul correspondante et définissez `Style.Font.Bold = true`, `Style.SetBackgroundColor('#hex')` ou `Style.NumberFormat = '$#,##0.00'`. IronXL expose l'intégralité de l'API de style Excel via la propriété `Style` des cellules et des plages.

Jordi Bardia
Ingénieur logiciel
Jordi est le plus compétent en Python, C# et C++, et lorsqu'il ne met pas à profit ses compétences chez Iron Software, il programme des jeux. Partageant les responsabilités des tests de produit, du développement de produit et de la recherche, Jordi apporte une immense valeur à l'amé...
Lire la suite

Équipe de soutien Iron

Nous sommes en ligne 24 heures sur 24, 5 jours sur 7.
Chat
Email
Appelez-moi