Insert data one by one
Dataset DS = lh. getexceldata (hiddenfield1.value );
Datatable dt = Ds. Tables [0];
String account = datetime. now. year. tostring () + datetime. now. month. tostring () + datetime. now. day. tostring () + datetime. now. hour. tostring () + datetime. now. minute. tostring () + datetime. now. second. tostring () + datetime. now. millisecond. tostring ();
For (INT I = 0; I <DT. Rows. Count; I ++)
{
String username = DT. Rows [I] [0]. tostring ();
String realname = DT. Rows [I] [1]. tostring ();
String part = DT. Rows [I] [2]. tostring ();
String amount = DT. Rows [I] [3]. tostring ();
String remarks = DT. Rows [I] [4]. tostring ();
LH. addlabortable (username, realname, part, amount, remarks, account );
Response. Write ("O! <Br> ");
}
LH. getexceldata is the method for obtaining dataset, and LH. addlabortable is the method for adding a piece of data.