Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC

Activities of "jibbar"

Hi, Thanks A lot :)

Now, From excel able to insert data in Grid. Will insert all the data in a table. Do I need to insert one by one? Is there any option to insert multiple rows in a Database Table?

Thanks again.

For Import Excel Data using application tried to use <a class="postlink" href="https://github.com/SheetJS/js-xlsx">https://github.com/SheetJS/js-xlsx</a> What I did... First.... Added all necessary files in Web -> libs folder Second... Add ScriptPath public const string Sheetjs_xlsxcore = "~/libs/sheetjs/xlsx.core.min.js"; public const string Sheetjs_cpexcel = "~/libs/sheetjs/cpexcel.js"; public const string Sheetjs_ods = "~/libs/sheetjs/ods.js"; public const string Sheetjs_shim = "~/libs/sheetjs/shim.js"; public const string Sheetjs_xlsx = "~/libs/sheetjs/xlsx.js"; public const string Sheetjs_jszip = "~/libs/sheetjs/jszip.js"; Third.... Added in FrontEndBundleConfig ScriptPaths.Sheetjs_xlsxcore, ScriptPaths.Sheetjs_cpexcel, ScriptPaths.Sheetjs_ods, ScriptPaths.Sheetjs_xlsx, ScriptPaths.Sheetjs_shim, ScriptPaths.Sheetjs_jszip Forth... In CSHTML Modal add following code <div> <label>@L("SelectExcelFile")</label> <js-xlsx onread="vm.read()" onerror="vm.error()"></js-xlsx> <input type="file" accept=".xls,.xlsx" onchange="angular.element(this).scope().handleFile(this)"/> </div> Finally... In JS Controller add following function $scope.handleFile = function (e) { debugger var files = e.files; var i, f; for (i = 0, f = files[i]; i != files.length; ++i) { var reader = new FileReader(); var name = f.name; reader.onload = function (e) { var data = e.target.result;

                    var workbook = XLSX.read(data, { type: 'binary' });

                    /* DO SOMETHING WITH workbook HERE */
                };
                reader.readAsBinaryString(f);
            }
        };

Seeing error ReferenceError: XLSX is not defined var workbook = XLSX.read(data, { type: 'binary' });

Can you help to resolve this problem??

Why my added script are not loading??

Showing 11 to 12 of 12 entries