Are you sure you want to report the post shown below? This will send an email to the ATVO administrators. Please include a short reason for reporting.
Users reporting for no reason may be locked out.
using System;
using ATVO.ThemesSDK;
using ATVO.ThemeEditor.ThemeModels;
using ATVO.ThemeEditor.Scripting.DotNET;
using ATVO.ThemesSDK.Data;
using System.Collections.Generic;
using System.Data;
using System.Linq;
namespace Scripts
{
public class test : IScript
{
public object Execute(ThemeContentItem item, object value, string parameter, ISimulation sim)
{
var sheet = item.Theme.Spreadsheets.Find("datasetLe.csv").Table.Data.Copy();
DataRow data = null;
foreach(DataRow row in sheet.Rows)
{
if((int)row[0] == 1234)
{
data = row;
data[1] = "QWERTY";
}
}
item.Theme.Spreadsheets.Find("datasetLe.csv").Table.Data.Clear();
item.Theme.Spreadsheets.Find("datasetLe.csv").Table.Data.Load(sheet.CreateDataReader());
item.Theme.Spreadsheets.Find("datasetLe.csv").Table.Data.AcceptChanges();
Console.WriteLine("Teste!!!");
return "";
}
}
}