Total Pageviews

Archives

gravatar

Read File Excel Using C#

//Utility Excel
using Excel = Microsoft.Office.Interop.Excel;
using System.Globalization;
private void OpenMyExcelFile()
{
Excel.Application xlApp;
Excel.Workbook xlWorkBook;
Excel.Worksheet xlWorkSheet;

Excel.Range range;

string str;
int rCnt = 0;
int cCnt = 0;

string Looping="";
string mypath="book1.xls";

object misValue = System.Reflection.Missing.Value;
System.Globalization.CultureInfo CI = new System.Globalization.CultureInfo("en-US");
System.Threading.Thread.CurrentThread.CurrentCulture = CI;


xlApp = new Excel.ApplicationClass();
xlWorkBook = xlApp.Workbooks.Open(myPath.trim(), 0, true, 5, "", "", true, Microsoft.Office.Interop.Excel.XlPlatform.xlWindows, "\t", false, false, 0, true, 1, 0);
xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);

string MyColoumB11 = xlWorkSheet.get_Range("B11", "B11").Value2.ToString();
string MyColoumB12= xlWorkSheet.get_Range("B12", "B12").Value2.ToString();

for (int i = 11; i < 31; i++)
{
Looping= Looping + i.ToString();
try
{
//Looping Data pada Kolom B, start B11 --> B30
string myData = xlWorkSheet.get_Range(Looping.Trim(), Looping.Trim()).Value2.ToString();
Looping= "B";

}

catch
{

}

}

xlWorkBook.Close(true, misValue, misValue);
xlApp.Quit();

releaseObject(xlWorkSheet);
releaseObject(xlWorkBook);
releaseObject(xlApp);


}

gravatar

How to change the root password in Ubuntu

As default Ubuntu has no password set for the root user.
To gain root access you have to type in your own user password. This is the password you set for the first user while installing Ubuntu.

To manually set a password for the root user, type in the following in the shell:
sudo passwd

sumber:
http://www.ubuntux.org/how-to-change-the-root-password-in-ubuntu

gravatar

Kembali Coding

Sekitar awal November 2010 adalah saat saya kembali untuk melakukan Aktivitas membuat system.
Memang tidak bisa di pungkiri,ternyata Coding itu merupakan sebuah Hobi yang susah dihilangkan dari saya.
Alhamdulillah dari hari ke hari semakin banyak pengetahuan mengenai pembangunan sistem.
Disamping mulai dari analisa,design struktur table,penentuan yg tepat untuk bahasa program yang akan digunakan, serta tak lupa back up system.

sampai saat ini saya masih duduk di bangku studi Paman Google untuk menimba ilmu.. :D
insyaallah kedepannya mudah2an bisa sharing tips dan trik nya.