Dear Sir,
Try this code>>
*Customer - OnPreDataItem()
*CountLine := 0;
*Customer - OnBeforeExportRecord()*
*Customer - OnAfterExportRecord()*
*Customer - OnBeforeImportRecord()*
CountLine += 1;
*Customer - OnAfterImportRecord()*
IF CountLine = 1 THEN BEGIN
CurrDataport.SKIP;
MODIFY;
END
*Customer - OnPostDataItem()*
On Tue, Jul 8, 2008 at 10:27 AM, kapil kumar <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have tried this for not importing the first line from excel through
> dataport but it is giving the same error of first line.Kindly suugest wat
> modification should i do
> Thanks in advance
> Kapil
>
> ----- Original Message ----
> From: navisionguy <[EMAIL PROTECTED] <jollyman070288%40yahoo.com>>
> To:
> [email protected]<Navision-Knowledge-Village%40yahoogroups.com>
> Sent: Friday, 13 June, 2008 11:40:07 PM
> Subject: [Navision-Knowledge-Village] Re: Problem In Importing Data from
> Excel
>
> In order to not import the first line , you bassicaly need to skip
> that line. You can do this with C\AL Code that you must insert in your
> dataport object.
>
> Step 1) Define a counter variable of type int.
> Step 2) In your OnPreDataItem( ) triger put a line to increment the
> variable counter: counter := counter + 1;
> Step 3) Again in OnPreDataItem( ) put the following code:
> If (counter = 1) then
> CurrDataport. SKIP;
>
> This will always should skip the first line from your import file.
>
> --- In Navision-Knowledge- [EMAIL PROTECTED] ups.com, kapil kumar
> <kapil72002@ ...> wrote:
> >
> > Hi Group,
> > I have a problem that while we import data from excel thru
> dataport we make excel in ".csv." format and have to delete the first
> line on excel file in which heading of fields are printed.
> >
> > Is there any way in which we dont have to delete the header of exel
> file and data get imported.
> >
> > Thanks in advance
> >
> > Kapil Kumar
> >
> >
> > Bollywood, fun, friendship, sports and more. You name it, we
> have it on http://in.promos. yahoo.com/ groups/bestofyah oo/
> >
> > [Non-text portions of this message have been removed]
> >
>
> Best Jokes, Best Friends, Best Food and more. Go to
> http://in.promos.yahoo.com/groups/bestofyahoo/
>
> [Non-text portions of this message have been removed]
>
>
>
[Non-text portions of this message have been removed]