Пример #1
0
 public static void writeCSV(string CSVPath, List <string[]> dataToBeWritten)
 {
     foreach (var strArray in dataToBeWritten)
     {
         string eachProfileData = string.Join(",", strArray);
         GlobusFileHelper.AppendStringToTextfileNewLine(eachProfileData, CSVPath);
     }
 }
Пример #2
0
        public static void ExportDataCSVFile(string CSV_Header, string CSV_Content, string CSV_FilePath)
        {
            try
            {
                if (!File.Exists(CSV_FilePath))
                {
                    GlobusFileHelper.AppendStringToTextFile(CSV_FilePath, CSV_Header);
                }

                GlobusFileHelper.AppendStringToTextFile(CSV_FilePath, CSV_Content);
            }
            catch (Exception)
            {
            }
        }
        public static void RemoveTextFromFile(string TextToRemove, string FilePath)
        {
            List <string> List_of_Users_In_BrowsedUsersPathToFollow    = GlobusFileHelper.ReadFiletoStringList(FilePath);
            List <string> List_of_Users_In_BrowsedUsersPathToFollowNew = new List <string>();

            foreach (string str in List_of_Users_In_BrowsedUsersPathToFollow)
            {
                if (str != TextToRemove)
                {
                    List_of_Users_In_BrowsedUsersPathToFollowNew.Add(str);
                }
            }
            GlobusFileHelper.WriteStringToTextfile("", FilePath);
            GlobusFileHelper.WriteListtoTextfile(List_of_Users_In_BrowsedUsersPathToFollowNew, FilePath);
        }
Пример #4
0
 public static void WriteCSVLineByLine(string CSVDestinationFilePath, string commaSeparatedData)
 {
     GlobusFileHelper.AppendStringToTextfileNewLine(CSVDestinationFilePath, commaSeparatedData);
 }