from the correct line from my initated file from line 6? Here's my code:
- protected void Page_Load (object sender, EventArgs, and)
- {
- }
- protected void import_Click (object sender, EventArgs and)
- {
- DataTable Data = new DataTable ();
- if (selectFileContent! = null)
- {
- string Excel = AppDomain.CurrentDomain.BaseDirectory + select File.FileName;
- select File.SaveAs (Excel);
- Data = Excel Data (Excel);
- var recordsValid = ((DataTable) Data) .Rows.OfType
(). Skip (5); - // Delete the last line
- recordsValid = RecordsValid.Take (RecordsValid.Count () - 1);
- // read 100 out of 100 records
- int amount_for_page = 100;
- int total_of_page;
- // Count valid records
- int qtd_total_registers = recordsValids.Count ();
- // Perform mathematical calculations for total pages.
- total_of_pages = (int) Math.Ceiling ((double) qtd_total_records / amount_by_page);
- if (recordsValid.Count ()> 0)
- {
- bool layoutValid = CheckLayout (Data);
- if (! layoutValid)
- ClientScript.RegisterStartupScript (typeof (string), "Error", "
Know the answer? Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions01ForumsTop experts
Arun PottiAnswers in the forums15answers02
Kamlesh KumarAnswers in the forums7answers03
Tahir AnsariAnswers in the forums5answers04
Sam HobbsAnswers in the forums4answers05
Željko PerićAnswers in the forums3answersFull leaderboard →
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend3days leftRegister