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??
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.
[Index("IX_FirstAndSecond", 1, IsUnique = true)] public int FirstColumn { get; set; }
Is there any system to create unique key constraints for multiple columns??
Thanks a lot.
Now raising another question,
When using sqlBulkInsert for large data it's getting error if there any redundant data. Is there any solution that sqlBulkInsert will insert all unique data just skipping the row of error.
Hi,
How I can insert HTML file in ASP.NET ZERO. How I can access that HTML file directly without routing.
For example, Want to access an HTML file through this URL localhost:6234/Application/testauth.html
Thanks
Dear,
in new version, what need to use replace of [Index(IsUnique = true)]?
this show error.
Thanks
Hi,
thans its working after install EntityFramework package.
Thanks
Dear,
when i try to run Unit test, show error "required permission not granted". my AppService is:
[AbpAuthorize(AppPermissions.Pages_CreditConsumptions_Create)] public async Task CreateCreditConsumption(CreateCreditConsumptionInput input) { //var creditConsumption = input.MapTo<CreditConsumption>(); var creditConsumption = new CreditConsumption }
So how to declare permission in AppService_test , when run unit test, it can pass?
Thanks in Advance
Hi,
Thanks.
Thanks
For Example, I have a menu as below: Template -- Create New Template -- Template List
If I click on the Sub-Menu "Create New Template" I want to open the page in a modal without redirecting in any URL.
Also, I want to show all the Template list Name as Sub-Menu item just under Template List.
How can be done? Kindly Give suggestion.
Thanks in Advance