Custom activity did not work

Hello Guys,

I had developped a C# classe and followed what is desciped in:

but when i had loaded the package i did not found my activity

here is a sample of the code:

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Data;
using System.Data.OleDb;
using System.Globalization;
//using System.Globalization;
using System.IO;
using Microsoft;
//using Microsoft.Office.Interop.Excel;
using System.Reflection;
using System.Diagnostics;
//using System.Threading.Tasks;
using System.Activities;
using System.ComponentModel;
using System.ComponentModel.Composition;

namespace EXceltodatatable

public class ExtraxtinsOCR

    public string FilePath { get; set; }

    public string Paramfile { get; set; }
    public  void Extraction(CodeActivityContext context)

         FilePath = FilePath;
         Paramfile = Paramfile;

        DataTable dtexcel = new DataTable();
        Console.WriteLine("Hello world");

1 Like

Hi @abdel,

namespace EXceltodatatable
public class ExtraxtinsOCR: CodeActivity

1 Like

Hi @abdel

check this

Ashwin S

1 Like

the c# code xwork perfectly in console mode,

now i had integrated the custome activity on uipath but there is Always an error:

Startindex can’t be less that 0.

But i hadn’t any indexof

i had only “Lastindexof”

Post the full code so we can see where the issue might be.

Did you make the basic custom math activity in the tutorial and get that to work through UiPath Studio?

send you by msg?

@abdel sure