Hi @Raki ,
Normally, PDF is difficult to edit, you can use Spire.PDF for .NET to convert PDF to Excel.
code:
using Spire.Pdf;
namespace PDFtoExcel
{
class Program
{
static void Main(string[] args)
{
PdfDocument pdf = new PdfDocument();
pdf.LoadFromFile("sample.pdf");
pdf.SaveToFile("ToExcel.xlsx",FileFormat.XLSX);
}
}
}
Use OleDB to read EXCEL files, and use EXCEL files as a data source to read data.
code:
public DataSet ExcelToDS(string Path)
{
string strConn = "Provider=Microsoft.Jet.OLEDB.4.0;" +"Data Source="+ Path +";"+"Extended Properties=Excel 8.0;";
OleDbConnection conn = new OleDbConnection(strConn);
conn.Open();
string strExcel = "";
OleDbDataAdapter myCommand = null;
DataSet ds = null;
strExcel="select * from [sheet1$]";
myCommand = new OleDbDataAdapter(strExcel, strConn);
ds = new DataSet();
myCommand.Fill(ds,"table1");
return ds;
}
Next, compare the two Excel data and add marks at the end.
Best regards,
Qi You