SyncfusionExamples / XlsIO-Examples

This repository contains examples of creating, reading, editing, and converting Excel documents programmatically using Syncfusion XlsIO.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

embed sample XLSX, employ usings & var

DickBaker opened this issue · comments

consider this GH example

  1. opens the sample InputTemplate.xlsx in 3 folders higher [i.e. the program source directory] which is bad practice because would be wrong on deploying to PROD [like good chefs your never reveal your sauces!]. Instead I propose you mark that xls to be copied to target folder on build, so then available in target to both dev and prod
  2. uses legacy explicit type, i.e. does not reflect current "var" guideline of using implied type
  3. legacy use of .Close() does not accord with best practice to wrap disposable objects within a using block [or statement for method scope], which will protect against any exceptions
  4. I would prefer file-scoped namespace instead of legacy block-scope
  5. this GH project does not contain the necessary .gitignore file, so any unwitting PR would contain all bin/obj/debug detritus

I will submit a PR (items 1-3) for consideration by SF, but the above issue occurs elsewhere and needs fixing throughout.