Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
170 commits
Select commit Hold shift + click to select a range
030d189
Add example: load-an-xlsx-workbook-and-convert-it-to-a-highresolution…
agent-aspose-cells-examples May 22, 2026
3eea78d
Add example: batch-convert-multiple-xlsx-files-to-pdf-and-store-resul…
agent-aspose-cells-examples May 22, 2026
a98ca33
Add example: export-each-sheet-as-jpeg-images-with-300-dpi-resolution…
agent-aspose-cells-examples May 22, 2026
bd97e13
Add example: read-a-csv-file-and-export-each-worksheet-as-separate-pn…
agent-aspose-cells-examples May 22, 2026
59b60a4
Add example: produce-png-images-with-transparent-background-from-a-cs…
agent-aspose-cells-examples May 22, 2026
c58df50
Add example: convert-multiple-csv-files-to-json-with-formatted-dates-…
agent-aspose-cells-examples May 22, 2026
d477d42
Add example: export-a-workbook-to-json-using-camelcase-property-namin…
agent-aspose-cells-examples May 22, 2026
3a02ed8
Add example: export-a-workbook-as-xml-with-a-custom-root-element
agent-aspose-cells-examples May 22, 2026
00e3fd8
Add example: convert-an-xls-workbook-to-a-markdown-document-with-alig…
agent-aspose-cells-examples May 22, 2026
68d0e2c
Add example: generate-githubflavored-markdown-tables-from-a-workbook-…
agent-aspose-cells-examples May 22, 2026
24c0a77
Add example: generate-an-mhtml-document-with-utf8-encoding-and-embedd…
agent-aspose-cells-examples May 22, 2026
dc805e9
Add example: load-a-tsv-workbook-and-convert-it-to-an-html-page-with-…
agent-aspose-cells-examples May 22, 2026
36630c5
Add example: embed-images-as-base64-in-a-single-html-file-during-export
agent-aspose-cells-examples May 23, 2026
dae4d97
Add example: generate-separate-html-files-per-worksheet-during-export…
agent-aspose-cells-examples May 23, 2026
007fbca
Add example: set-html-image-options-dpi-to-200-and-export-html-with-h…
agent-aspose-cells-examples May 23, 2026
0a0c4f6
Add example: set-html-image-options-dpi-to-150-and-export-html-with-s…
agent-aspose-cells-examples May 23, 2026
ac23e3b
Add example: open-an-ods-workbook-set-odfstrictversion-to-11-and-save…
agent-aspose-cells-examples May 23, 2026
18766f8
Add example: save-a-workbook-as-ods-complying-with-odf-12-using-odfve…
agent-aspose-cells-examples May 23, 2026
1ca62ec
Add example: save-a-workbook-as-sxc-format-using-odssaveoptions-for-o…
agent-aspose-cells-examples May 23, 2026
ebd513a
Add example: save-a-workbook-as-fods-format-flat-ods-using-odssaveopt…
agent-aspose-cells-examples May 23, 2026
c2f1e40
Add example: assign-a-graphic-stream-to-odspagebackground-and-save-th…
agent-aspose-cells-examples May 23, 2026
145963a
Add example: apply-odspagebackground-solid-blue-color-and-save-ods-wi…
agent-aspose-cells-examples May 23, 2026
90f7e28
Add example: retrieve-the-odspagebackground-color-from-an-ods-file-fo…
agent-aspose-cells-examples May 23, 2026
8d397ae
Add example: extract-the-graphic-background-stream-from-an-ods-file-a…
agent-aspose-cells-examples May 23, 2026
f3ea15e
Add example: read-odspagebackground-graphic-data-from-an-ods-file-and…
agent-aspose-cells-examples May 23, 2026
8296957
Add example: verify-that-an-ods-background-graphic-appears-in-the-exp…
agent-aspose-cells-examples May 23, 2026
aeda388
Add example: convert-a-workbook-to-an-xps-document-for-highquality-pr…
agent-aspose-cells-examples May 23, 2026
7f23454
Add example: export-a-workbook-to-json-with-prettyprinted-indentation…
agent-aspose-cells-examples May 23, 2026
e2d7231
Add example: load-multiple-csv-files-and-convert-each-to-ods-using-de…
agent-aspose-cells-examples May 23, 2026
5a584c4
Add example: load-a-commadelimited-csv-file-using-txtloadoptions-and-…
agent-aspose-cells-examples May 23, 2026
643e4c6
Add example: configure-txtloadoptionsseparator-to-a-semicolon-load-a-…
agent-aspose-cells-examples May 23, 2026
154a393
Add example: set-txtloadoptionsseparator-to-a-pipe-character-load-a-p…
agent-aspose-cells-examples May 23, 2026
72c0536
Add example: enable-txtloadoptionsismultiencoded-read-a-mixedencoding…
agent-aspose-cells-examples May 23, 2026
120e99e
Add example: load-a-csv-file-with-a-custom-comment-character-ignore-c…
agent-aspose-cells-examples May 23, 2026
b638224
Add example: load-a-csv-file-trim-whitespace-from-all-string-cells-an…
agent-aspose-cells-examples May 23, 2026
87b1e45
Add example: replace-invalid-characters-automatically-during-csv-load…
agent-aspose-cells-examples May 23, 2026
67af4e3
Add example: load-a-csv-file-replace-all-occurrences-of-a-specific-su…
agent-aspose-cells-examples May 23, 2026
34af2c4
Add example: load-a-csv-file-remove-rows-where-the-first-column-is-em…
agent-aspose-cells-examples May 23, 2026
e0f4e73
Add example: load-a-csv-file-detect-duplicate-rows-based-on-a-key-col…
agent-aspose-cells-examples May 23, 2026
8ca423d
Add example: validate-numeric-columns-after-loading-csv-by-checking-c…
agent-aspose-cells-examples May 23, 2026
b7896d8
Add example: configure-txtloadoptionspreferredparsers-to-a-custom-num…
agent-aspose-cells-examples May 23, 2026
39e89e8
Add example: create-a-custom-parser-to-interpret-dates-in-ddmmyyyy-fo…
agent-aspose-cells-examples May 23, 2026
a5199f8
Add example: load-a-csv-file-containing-formulas-without-loaddataonly…
agent-aspose-cells-examples May 23, 2026
76d9c03
Add example: import-a-csv-file-into-an-existing-workbook-starting-at-…
agent-aspose-cells-examples May 23, 2026
a497116
Add example: batch-process-all-csv-files-in-a-directory-applying-a-cu…
agent-aspose-cells-examples May 23, 2026
5fe26b0
Add example: create-a-utility-that-monitors-a-folder-and-automaticall…
agent-aspose-cells-examples May 23, 2026
81c8395
Add example: load-a-tsv-file-using-loadformattsv-and-export-its-conte…
agent-aspose-cells-examples May 23, 2026
20c3c01
Add example: read-a-txt-file-with-tab-delimiters-convert-it-to-an-exc…
agent-aspose-cells-examples May 23, 2026
37da539
Add example: convert-an-excel-workbook-containing-multiple-sheets-to-…
agent-aspose-cells-examples May 23, 2026
615f5e7
Add example: export-a-specific-worksheet-to-a-txt-file-using-tab-deli…
agent-aspose-cells-examples May 23, 2026
6dd5220
Add example: after-converting-csv-to-xlsx-add-a-data-validation-rule-…
agent-aspose-cells-examples May 23, 2026
2da7c4e
Add example: read-a-csv-file-calculate-sum-of-a-numeric-column-and-wr…
agent-aspose-cells-examples May 23, 2026
5aa78b4
Add example: load-a-csv-file-transpose-its-rows-and-columns-programma…
agent-aspose-cells-examples May 23, 2026
f510a43
Add example: apply-a-filter-to-hide-rows-where-a-status-column-equals…
agent-aspose-cells-examples May 23, 2026
b5d7172
Add example: load-a-csv-file-split-a-combined-address-column-into-sep…
agent-aspose-cells-examples May 23, 2026
d41bece
Add example: convert-an-excel-workbook-to-a-pipedelimited-txt-file-by…
agent-aspose-cells-examples May 23, 2026
ab52899
Add example: use-txtloadoptions-to-specify-utf16-encoding-when-loadin…
agent-aspose-cells-examples May 23, 2026
9b2cec1
Add example: load-a-csv-file-compute-running-total-for-a-numeric-colu…
agent-aspose-cells-examples May 23, 2026
e137943
Add example: load-a-workbook-from-a-memory-stream-and-save-it-as-png-…
agent-aspose-cells-examples May 23, 2026
262fee1
Add example: load-a-workbook-from-a-byte-array-and-convert-it-directl…
agent-aspose-cells-examples May 23, 2026
540266e
Add example: load-a-passwordprotected-xls-file-and-export-it-to-pdf-w…
agent-aspose-cells-examples May 23, 2026
7fb7862
Add example: load-an-encrypted-workbook-using-a-password-and-convert-…
agent-aspose-cells-examples May 23, 2026
e719f16
Add example: load-a-workbook-with-custom-load-options-to-ignore-missi…
agent-aspose-cells-examples May 23, 2026
3945d1f
Add example: load-a-workbook-with-custom-load-options-to-preserve-all…
agent-aspose-cells-examples May 23, 2026
820fb43
Add example: load-a-workbook-with-custom-load-options-to-retain-vba-m…
agent-aspose-cells-examples May 23, 2026
5646b90
Add example: load-a-workbook-from-a-url-and-convert-it-to-pdf
agent-aspose-cells-examples May 23, 2026
c17e5f8
Add example: load-a-workbook-from-cloud-storage-and-convert-it-to-csv
agent-aspose-cells-examples May 23, 2026
084c92d
Add example: convert-workbook-to-pdf-while-preserving-original-layout…
agent-aspose-cells-examples May 23, 2026
aaee9d1
Add example: convert-a-workbook-to-pdf-with-grayscale-rendering-for-r…
agent-aspose-cells-examples May 23, 2026
f4e7829
Add example: convert-a-workbook-to-pdf-using-custom-page-margins-of-0…
agent-aspose-cells-examples May 23, 2026
8c7e76b
Add example: export-a-workbook-to-pdf-while-including-hidden-rows-and…
agent-aspose-cells-examples May 23, 2026
57219c9
Add example: export-a-workbook-to-pdf-while-preserving-cell-backgroun…
agent-aspose-cells-examples May 23, 2026
d9f44a7
Add example: export-a-workbook-to-pdf-ignoring-cell-background-colors…
agent-aspose-cells-examples May 23, 2026
4b7c74b
Add example: convert-a-workbook-to-pdf-and-embed-javascript-that-trig…
agent-aspose-cells-examples May 23, 2026
1728be8
Add example: convert-a-workbook-to-pdf-and-add-a-semitransparent-wate…
agent-aspose-cells-examples May 23, 2026
a24b473
Add example: convert-a-workbook-to-pdf-and-include-custom-header-and-…
agent-aspose-cells-examples May 23, 2026
6587e94
Add example: convert-a-workbook-to-pdf-and-set-security-permissions-t…
agent-aspose-cells-examples May 23, 2026
2c8ac06
Add example: convert-a-workbook-to-pdf-and-compress-embedded-images-u…
agent-aspose-cells-examples May 23, 2026
10f05e3
Add example: convert-a-workbook-to-pdf-and-set-image-quality-to-80-pe…
agent-aspose-cells-examples May 23, 2026
a33c0b9
Add example: convert-a-workbook-to-pdf-and-embed-document-metadata-su…
agent-aspose-cells-examples May 23, 2026
1df4443
Add example: convert-a-workbook-to-pdf-and-set-the-document-title-pro…
agent-aspose-cells-examples May 23, 2026
5b64cfd
Add example: convert-a-workbook-to-pdf-and-assign-the-author-property…
agent-aspose-cells-examples May 23, 2026
8c8437f
Add example: convert-a-workbook-to-pdf-and-define-the-subject-propert…
agent-aspose-cells-examples May 23, 2026
9e1e94e
Add example: convert-a-workbook-to-pdf-and-add-relevant-keywords-to-i…
agent-aspose-cells-examples May 23, 2026
e7720aa
Add example: convert-a-workbook-to-pdf-and-set-creation-date-to-curre…
agent-aspose-cells-examples May 23, 2026
ae5b542
Add example: convert-a-workbook-to-pdf-and-set-modification-date-to-r…
agent-aspose-cells-examples May 23, 2026
6d5011a
Add example: convert-a-workbook-to-pdf-and-include-custom-document-pr…
agent-aspose-cells-examples May 23, 2026
77ca405
Add example: convert-a-workbook-to-pdf-and-include-all-cell-comments-…
agent-aspose-cells-examples May 23, 2026
8158db6
Add example: convert-a-workbook-to-pdf-and-exclude-cell-comments-to-p…
agent-aspose-cells-examples May 23, 2026
6c67748
Add example: convert-a-workbook-to-pdf-and-preserve-all-hyperlinks-fo…
agent-aspose-cells-examples May 23, 2026
b4a3f14
Add example: convert-a-workbook-to-pdf-and-remove-hyperlinks-to-creat…
agent-aspose-cells-examples May 23, 2026
76b19b9
Add example: convert-a-workbook-to-pdf-and-embed-a-custom-truetype-fo…
agent-aspose-cells-examples May 23, 2026
5ec0f36
Add example: convert-a-workbook-to-pdf-and-embed-a-custom-opentype-fo…
agent-aspose-cells-examples May 23, 2026
3650cd2
Add example: convert-a-workbook-to-pdf-using-system-default-font-subs…
agent-aspose-cells-examples May 23, 2026
1439974
Add example: convert-a-workbook-to-pdf-and-disable-font-embedding-to-…
agent-aspose-cells-examples May 23, 2026
daa79f0
Add example: convert-a-workbook-to-pdf-and-set-image-dpi-to-300-for-h…
agent-aspose-cells-examples May 23, 2026
172a3d0
Add example: convert-a-workbook-to-pdf-and-set-image-dpi-to-600-for-d…
agent-aspose-cells-examples May 23, 2026
7e61624
Add example: convert-a-workbook-to-pdf-and-apply-lossless-image-compr…
agent-aspose-cells-examples May 23, 2026
5864c9c
Add example: convert-a-workbook-to-pdf-and-apply-jpeg-compression-wit…
agent-aspose-cells-examples May 23, 2026
8a710ef
Add example: convert-a-workbook-to-pdf-and-apply-jpeg-compression-wit…
agent-aspose-cells-examples May 23, 2026
3700391
Add example: convert-a-workbook-to-pdf-and-enable-fast-web-view-for-q…
agent-aspose-cells-examples May 23, 2026
9472cf2
Add example: convert-a-workbook-to-pdf-and-disable-fast-web-view-to-p…
agent-aspose-cells-examples May 23, 2026
c6c47f4
Add example: convert-a-workbook-to-pdf-and-set-document-language-to-f…
agent-aspose-cells-examples May 23, 2026
2dd7055
Add example: convert-a-workbook-to-pdf-and-set-document-direction-to-…
agent-aspose-cells-examples May 23, 2026
24b83ad
Add example: convert-a-workbook-to-pdf-and-set-document-direction-to-…
agent-aspose-cells-examples May 23, 2026
679c56e
Add example: convert-a-workbook-to-pdf-and-add-a-digital-signature-us…
agent-aspose-cells-examples May 23, 2026
1e9547b
Add example: convert-a-workbook-to-pdf-and-validate-an-existing-digit…
agent-aspose-cells-examples May 23, 2026
84d17d8
Add example: convert-a-workbook-to-pdf-and-flatten-all-annotations-to…
agent-aspose-cells-examples May 23, 2026
60bca44
Add example: convert-a-workbook-to-pdf-and-retain-interactive-form-fi…
agent-aspose-cells-examples May 23, 2026
f8a3cef
Add example: convert-a-workbook-to-pdf-and-remove-all-form-fields-to-…
agent-aspose-cells-examples May 23, 2026
dd502ee
Add example: convert-a-workbook-to-pdf-and-set-page-scaling-to-fit-pr…
agent-aspose-cells-examples May 23, 2026
a1dce1b
Add example: convert-a-workbook-to-pdf-and-set-page-scaling-to-none-t…
agent-aspose-cells-examples May 23, 2026
64c42c2
Add example: convert-a-workbook-to-pdf-and-enable-accessibility-tags-…
agent-aspose-cells-examples May 23, 2026
fab2c07
Add example: convert-a-workbook-to-pdf-and-disable-accessibility-tags…
agent-aspose-cells-examples May 23, 2026
1feaa4f
Add example: convert-a-workbook-to-pdf-and-generate-outline-bookmarks…
agent-aspose-cells-examples May 23, 2026
af190b1
Add example: convert-a-workbook-to-pdf-and-generate-outline-bookmarks…
agent-aspose-cells-examples May 23, 2026
ffe1db3
Add example: convert-a-workbook-to-pdf-and-embed-external-linked-imag…
agent-aspose-cells-examples May 23, 2026
9a6a222
Add example: convert-a-workbook-to-pdf-and-exclude-external-linked-im…
agent-aspose-cells-examples May 23, 2026
7e15cd6
Add example: convert-a-workbook-to-pdf-and-set-pdf-version-to-17-for-…
agent-aspose-cells-examples May 23, 2026
a38e1f8
Add example: convert-a-workbook-to-pdf-and-enable-document-encryption…
agent-aspose-cells-examples May 23, 2026
96d63b6
Add example: export-a-specific-worksheet-to-csv-trimming-leading-blan…
agent-aspose-cells-examples May 23, 2026
aadd269
Add example: save-an-entire-workbook-as-csv-while-keeping-separators-…
agent-aspose-cells-examples May 23, 2026
f6243fd
Add example: generate-csv-files-from-each-worksheet-applying-custom-d…
agent-aspose-cells-examples May 23, 2026
1c3e438
Add example: batch-convert-multiple-excel-files-to-csv-trimming-leadi…
agent-aspose-cells-examples May 23, 2026
a807b78
Add example: save-a-workbook-as-csv-while-preserving-original-cell-da…
agent-aspose-cells-examples May 23, 2026
1ee136e
Add example: export-a-workbook-to-csv-with-date-cells-formatted-as-is…
agent-aspose-cells-examples May 23, 2026
c0a1890
Add example: export-a-workbook-to-csv-rounding-numeric-values-to-two-…
agent-aspose-cells-examples May 23, 2026
85bc4f4
Add example: export-a-workbook-to-csv-using-double-quotes-as-text-qua…
agent-aspose-cells-examples May 23, 2026
570bab5
Add example: export-a-workbook-to-csv-handling-line-breaks-inside-cel…
agent-aspose-cells-examples May 23, 2026
7f35eeb
Add example: export-a-workbook-to-csv-while-trimming-trailing-blank-r…
agent-aspose-cells-examples May 23, 2026
2b5ed89
Add example: export-a-workbook-to-csv-preserving-empty-cells-as-empty…
agent-aspose-cells-examples May 23, 2026
ca32e55
Add example: export-a-workbook-to-csv-applying-localespecific-number-…
agent-aspose-cells-examples May 23, 2026
7a9c7b9
Add example: export-a-workbook-to-csv-using-utf16-encoding-to-support…
agent-aspose-cells-examples May 23, 2026
a943d50
Add example: export-a-workbook-to-csv-with-a-byte-order-mark-to-ensur…
agent-aspose-cells-examples May 23, 2026
4bb94df
Add example: convert-a-workbook-to-csv-and-include-only-column-header…
agent-aspose-cells-examples May 23, 2026
8b41001
Add example: convert-a-workbook-to-csv-and-exclude-column-headers-to-…
agent-aspose-cells-examples May 23, 2026
346dc19
Add example: convert-a-workbook-to-csv-and-prepend-row-numbers-as-fir…
agent-aspose-cells-examples May 23, 2026
8112576
Add example: convert-a-workbook-to-csv-and-omit-row-numbers-to-keep-o…
agent-aspose-cells-examples May 23, 2026
d355e86
Add example: convert-a-workbook-to-csv-and-apply-custom-cell-value-fo…
agent-aspose-cells-examples May 23, 2026
f12580f
Add example: convert-a-workbook-to-csv-and-preserve-formulas-as-text-…
agent-aspose-cells-examples May 23, 2026
29f04a5
Add example: convert-a-workbook-to-csv-and-replace-formulas-with-thei…
agent-aspose-cells-examples May 23, 2026
3d570f0
Add example: convert-a-workbook-to-csv-and-mask-sensitive-data-using-…
agent-aspose-cells-examples May 23, 2026
5efca67
Add example: convert-a-workbook-to-csv-and-split-large-worksheet-into…
agent-aspose-cells-examples May 23, 2026
344bbbb
Add example: convert-a-workbook-to-csv-and-split-worksheet-by-column-…
agent-aspose-cells-examples May 23, 2026
62a079f
Add example: convert-a-workbook-to-csv-and-generate-a-manifest-file-l…
agent-aspose-cells-examples May 23, 2026
3e20b8c
Add example: convert-a-workbook-to-csv-and-preserve-cell-comments-by-…
agent-aspose-cells-examples May 23, 2026
4f1c8ea
Add example: convert-a-workbook-to-csv-and-ignore-cell-comments-to-ke…
agent-aspose-cells-examples May 23, 2026
180e1a7
Add example: convert-a-workbook-to-csv-and-ignore-cell-hyperlinks-to-…
agent-aspose-cells-examples May 23, 2026
6a1a50b
Add example: convert-a-workbook-to-csv-and-apply-localespecific-date-…
agent-aspose-cells-examples May 23, 2026
a723ac4
Add example: convert-a-workbook-to-csv-and-apply-localespecific-numbe…
agent-aspose-cells-examples May 23, 2026
181f1f8
Add example: convert-a-workbook-to-csv-and-compress-output-file-using…
agent-aspose-cells-examples May 23, 2026
8cecf0b
Add example: convert-a-workbook-to-csv-and-generate-a-summary-statist…
agent-aspose-cells-examples May 23, 2026
fa1570e
Add example: extract-all-embedded-chart-images-from-a-workbook-and-st…
agent-aspose-cells-examples May 23, 2026
ec8382c
Add example: remove-empty-rows-and-columns-from-a-workbook-before-sav…
agent-aspose-cells-examples May 23, 2026
3c2c08b
Add example: extract-all-cell-formulas-into-a-json-document-preservin…
agent-aspose-cells-examples May 23, 2026
2cbddee
Add example: save-a-workbook-as-pdf-using-custom-save-options-to-enfo…
agent-aspose-cells-examples May 23, 2026
32083d9
Add example: save-a-workbook-as-csv-using-custom-save-options-to-defi…
agent-aspose-cells-examples May 23, 2026
f63416c
Add example: save-a-workbook-as-csv-using-custom-save-options-to-spec…
agent-aspose-cells-examples May 23, 2026
575ca83
Add example: save-a-workbook-as-csv-using-custom-save-options-to-trim…
agent-aspose-cells-examples May 23, 2026
445e31d
Add example: save-a-workbook-as-csv-using-custom-save-options-to-keep…
agent-aspose-cells-examples May 23, 2026
7b657c6
Add example: batch-convert-a-folder-of-xlsx-files-to-pdf-preserving-p…
agent-aspose-cells-examples May 23, 2026
51d6a4e
Add example: perform-batch-conversion-of-excel-files-to-pdf-using-par…
agent-aspose-cells-examples May 23, 2026
23601d6
Add example: perform-batch-conversion-with-progress-callback-that-rep…
agent-aspose-cells-examples May 23, 2026
09be605
Add example: perform-batch-conversion-with-error-handling-that-logs-c…
agent-aspose-cells-examples May 23, 2026
e3c372a
Add example: perform-batch-conversion-and-generate-a-summary-report-l…
agent-aspose-cells-examples May 23, 2026
0038d45
Add example: perform-batch-conversion-of-excel-files-to-pdf-with-per-…
agent-aspose-cells-examples May 23, 2026
df837d0
Add example: perform-batch-conversion-of-excel-files-to-csv-with-prog…
agent-aspose-cells-examples May 23, 2026
d2177e0
Add example: convert-a-workbook-to-pdf-and-apply-a-grayscale-color-pr…
agent-aspose-cells-examples May 23, 2026
7e8edd5
Add example: convert-a-workbook-to-pdf-and-set-document-to-open-in-fu…
agent-aspose-cells-examples May 23, 2026
c6a48f7
Add example: convert-a-workbook-to-pdf-and-add-a-custom-javascript-al…
agent-aspose-cells-examples May 23, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
using System;
using Aspose.Cells;
using Aspose.Cells.Utility;

namespace AsposeCellsDataValidationDemo
{
class Program
{
static void Main()
{
// Paths for source CSV and intermediate XLSX file
string csvPath = "input.csv";
string xlsxPath = "output.xlsx";

// -------------------------------------------------
// 1. Convert CSV to XLSX using the provided utility
// -------------------------------------------------
// The ConversionUtility.Convert method is the approved way to perform the conversion.
ConversionUtility.Convert(csvPath, xlsxPath);

// -------------------------------------------------
// 2. Load the generated workbook
// -------------------------------------------------
Workbook workbook = new Workbook(xlsxPath);

// -------------------------------------------------
// 3. Add a data‑validation rule to restrict values
// in column B (index 1) to whole numbers between 1 and 100
// -------------------------------------------------
Worksheet sheet = workbook.Worksheets[0];
ValidationCollection validations = sheet.Validations;

// Create a new validation object
int validationIndex = validations.Add();
Validation validation = validations[validationIndex];

// Set validation type and criteria
validation.Type = ValidationType.WholeNumber;
validation.Operator = OperatorType.Between;
validation.Formula1 = "1"; // Minimum allowed value
validation.Formula2 = "100"; // Maximum allowed value

// Apply the validation to the whole column B (rows 0‑1048575)
CellArea area = new CellArea
{
StartRow = 0,
StartColumn = 1, // Column B
EndRow = sheet.Cells.MaxDataRow, // Use existing max row or a large number
EndColumn = 1
};
validation.AddArea(area);

// -------------------------------------------------
// 4. Save the workbook with the validation rule applied
// -------------------------------------------------
workbook.Save(xlsxPath, SaveFormat.Xlsx);

Console.WriteLine("CSV converted to XLSX and data validation added successfully.");
}
}
}
226 changes: 226 additions & 0 deletions conversion/agents.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
using System;
using Aspose.Cells;

namespace AsposeCellsFilterExample
{
class Program
{
static void Main()
{
// Path to the source CSV file
string csvPath = "input.csv";

// Load the CSV data into a workbook
Workbook workbook = new Workbook(csvPath);
Worksheet sheet = workbook.Worksheets[0];

// Determine the used range (including header row)
int lastRow = sheet.Cells.MaxDataRow; // zero‑based index of the last row with data
int lastColumn = sheet.Cells.MaxDataColumn; // zero‑based index of the last column with data

// Build the address string for the autofilter range (e.g., "A1:D10")
string startCell = "A1";
string endCell = CellsHelper.CellIndexToName(lastRow, lastColumn);
sheet.AutoFilter.Range = $"{startCell}:{endCell}";

// Assume the "Status" column is the third column (C) – zero‑based index = 2
int statusColumnIndex = 2;

// Apply a filter to hide rows where Status = "Inactive"
sheet.AutoFilter.Filter(statusColumnIndex, "Inactive");

// Refresh the filter so that rows not matching the criteria become hidden
sheet.AutoFilter.Refresh();

// Save the filtered workbook
workbook.Save("output.xlsx");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
using System;
using System.Drawing;
using Aspose.Cells;
using Aspose.Cells.Ods;

namespace OdsPageBackgroundExample
{
class Program
{
static void Main()
{
// Create a new workbook
Workbook workbook = new Workbook();

// Access the first worksheet
Worksheet sheet = workbook.Worksheets[0];

// Get the ODS page background object
OdsPageBackground background = sheet.PageSetup.ODSPageBackground;

// Set background type to solid color
background.Type = OdsPageBackgroundType.Color;

// Apply solid blue color
background.Color = Color.Blue;

// Save the workbook as ODS with the background applied
workbook.Save("OdsPageBackgroundBlue.ods");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System;
using System.IO;
using System.Drawing;
using Aspose.Cells;
using Aspose.Cells.Ods;

namespace OdsBackgroundDemo
{
class Program
{
static void Main()
{
// Create a new workbook and get the first worksheet
Workbook workbook = new Workbook();
Worksheet sheet = workbook.Worksheets[0];

// Access the ODS page background through PageSetup
OdsPageBackground background = sheet.PageSetup.ODSPageBackground;

// Set a solid background color
background.Type = OdsPageBackgroundType.Color;
background.Color = Color.LightGreen;

// Change the type to graphic to assign an image stream
background.Type = OdsPageBackgroundType.Graphic;

// Load image data into a byte array (replace with a valid image path)
string imagePath = "background.png";
if (File.Exists(imagePath))
{
background.GraphicData = File.ReadAllBytes(imagePath);
background.GraphicType = OdsPageBackgroundGraphicType.Tile;
background.GraphicPositionType = OdsPageBackgroundGraphicPositionType.CenterCenter;
}
else
{
Console.WriteLine($"Image file not found: {imagePath}");
return;
}

// Save the workbook as ODS
workbook.Save("WorkbookWithGraphicBackground.ods");
Console.WriteLine("Workbook saved successfully.");
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
using System;
using System.IO;
using Aspose.Cells.Utility;

namespace AsposeCellsBatchConversion
{
public class XlsxToPdfBatchConverter
{
// Converts all .xlsx files in the specified folder to PDF.
// The ConversionUtility preserves page margins, orientation and other print settings.
public static void ConvertFolder(string sourceFolder, string destinationFolder)
{
// Ensure source folder exists
if (!Directory.Exists(sourceFolder))
throw new DirectoryNotFoundException($"Source folder not found: {sourceFolder}");

// Create destination folder if it does not exist
Directory.CreateDirectory(destinationFolder);

// Get all .xlsx files (including .xlsm, .xltx, etc. if needed)
string[] excelFiles = Directory.GetFiles(sourceFolder, "*.xlsx", SearchOption.TopDirectoryOnly);

foreach (string excelPath in excelFiles)
{
// Build PDF file name with same base name
string fileNameWithoutExt = Path.GetFileNameWithoutExtension(excelPath);
string pdfPath = Path.Combine(destinationFolder, fileNameWithoutExt + ".pdf");

// Perform conversion using Aspose.Cells ConversionUtility
// This method respects the workbook's page setup (margins, orientation, etc.)
ConversionUtility.Convert(excelPath, pdfPath);

Console.WriteLine($"Converted: {excelPath} -> {pdfPath}");
}
}

// Example entry point
public static void Main(string[] args)
{
// Example usage:
// args[0] = source folder, args[1] = destination folder
if (args.Length < 2)
{
Console.WriteLine("Usage: XlsxToPdfBatchConverter <sourceFolder> <destinationFolder>");
return;
}

try
{
ConvertFolder(args[0], args[1]);
Console.WriteLine("Batch conversion completed successfully.");
}
catch (Exception ex)
{
Console.WriteLine($"Error during conversion: {ex.Message}");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
using System;
using System.IO;
using Aspose.Cells;

namespace BatchExcelToCsv
{
class Program
{
static void Main(string[] args)
{
// Input folder containing Excel files
string inputFolder = @"C:\InputExcelFiles";
// Output folder where CSV files will be saved
string outputFolder = @"C:\OutputCsvFiles";

// Verify input directory exists
if (!Directory.Exists(inputFolder))
{
Console.WriteLine($"Input folder not found: {inputFolder}");
return;
}

// Ensure output directory exists
Directory.CreateDirectory(outputFolder);

// Define the Excel file extensions to process
string[] excelExtensions = new[] { ".xlsx", ".xls", ".xlsm", ".xlsb", ".ods" };

try
{
// Enumerate all files with the defined extensions
foreach (string filePath in Directory.EnumerateFiles(inputFolder, "*.*", SearchOption.TopDirectoryOnly))
{
if (Array.IndexOf(excelExtensions, Path.GetExtension(filePath).ToLower()) < 0)
continue; // Skip non‑Excel files

// Verify the file still exists before processing
if (!File.Exists(filePath))
{
Console.WriteLine($"File not found (skipped): {filePath}");
continue;
}

try
{
// Load the workbook (default LoadOptions are sufficient for Excel formats)
Workbook workbook = new Workbook(filePath);

// Prepare CSV save options
TxtSaveOptions saveOptions = new TxtSaveOptions(SaveFormat.Csv)
{
// Trim leading blank rows/columns (default is true, set explicitly for clarity)
TrimLeadingBlankRowAndColumn = true,
// Export all worksheets into a single CSV (set to true if required)
ExportAllSheets = true
};

// Build output CSV file name (same base name, .csv extension)
string outputFileName = Path.GetFileNameWithoutExtension(filePath) + ".csv";
string outputPath = Path.Combine(outputFolder, outputFileName);

// Save the workbook as CSV using the configured options
workbook.Save(outputPath, saveOptions);

Console.WriteLine($"Converted: {Path.GetFileName(filePath)} -> {outputFileName}");
}
catch (Exception ex)
{
Console.WriteLine($"Error processing file '{filePath}': {ex.Message}");
}
}

Console.WriteLine("Batch conversion completed.");
}
catch (Exception ex)
{
Console.WriteLine($"Unexpected error: {ex.Message}");
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
using System;
using System.IO;
using Aspose.Cells.Utility;

namespace AsposeCellsBatchConversion
{
public class BatchXlsxToPdfConverter
{
public static void Main()
{
// Folder containing the source XLSX files
string inputFolder = "input";

// Folder where the converted PDF files will be saved
string outputFolder = "output";

// Ensure the output directory exists
Directory.CreateDirectory(outputFolder);

// Get all .xlsx files in the input folder
string[] xlsxFiles = Directory.GetFiles(inputFolder, "*.xlsx", SearchOption.TopDirectoryOnly);

foreach (string sourcePath in xlsxFiles)
{
try
{
// Determine the PDF file name based on the source file name
string fileNameWithoutExt = Path.GetFileNameWithoutExtension(sourcePath);
string destPath = Path.Combine(outputFolder, fileNameWithoutExt + ".pdf");

// Convert the Excel file to PDF using Aspose.Cells ConversionUtility
ConversionUtility.Convert(sourcePath, destPath);

Console.WriteLine($"Converted: {sourcePath} -> {destPath}");
}
catch (Exception ex)
{
// Log any conversion errors but continue processing other files
Console.WriteLine($"Error converting '{sourcePath}': {ex.Message}");
}
}

Console.WriteLine("Batch conversion completed.");
}
}
}
Loading