Friday, December 27, 2019

Accessing and Managing MS Excel Sheets With Delphi

This step-by-step guide describes how to connect to Microsoft Excel, retrieve sheet data, and enable editing of the data using the DBGrid. Youll also find a list of the most common errors that might appear in the process, plus how to deal with them. Whats Covered Below: Methods for transferring data between Excel and Delphi. How to connect to Excel with ADO  (ActiveX Data Objects) and Delphi.Creating an Excel spreadsheet editor using Delphi and ADORetrieving the data from Excel. How to reference a table (or range) in an Excel workbook.A discussion on Excel field (column) typesHow to modify Excel sheets: edit, add  and delete rows.Transferring data from a Delphi application to Excel. How to create a worksheet and fill it with custom data from an MS Access database. How to Connect to Microsoft Excel Microsoft Excel is a powerful spreadsheet calculator and data analysis tool. Since rows and columns of an Excel worksheet closely relate to the rows and columns of a database table, many developers find it appropriate to transport their data into an Excel workbook for analysis purposes; and retrieve data back to the application afterwards. The most commonly used approach to data exchange between your application and Excel is  Automation. Automation provides a way to read Excel data using the Excel Object Model to dive into the worksheet, extract its data, and display it inside a grid-like component, namely DBGrid or StringGrid. Automation gives you the greatest flexibility for locating the data in the workbook as well as the ability to format the worksheet and make various settings at run time. To transfer your data to and from Excel without Automation, you can use other methods such as: Write data into a comma-delimited text file, and let Excel parse the file into cellsTransfer data using DDE (Dynamic Data Exchange)Transfer your data to and from  a worksheet using ADO Data Transfer Using ADO Since Excel is JET OLE DB compliant, you can connect to it with Delphi using ADO (dbGO or AdoExpress) and then retrieve the worksheets data into an ADO dataset by issuing an  SQL query  (just like you would open a dataset against any database table). In this way, all the methods and features of the ADODataset object are available to process the Excel data. In other words, using the ADO components let you build an application that can use an Excel workbook as the database. Another important fact is that Excel is an out-of-process ActiveX server. ADO runs in-process  and saves the overhead of costly out-of-process calls. When you connect to Excel using ADO, you can only exchange raw data to and from a workbook. An ADO connection cannot be used for sheet formatting or implementing formulas to cells. However, if you transfer your data to a worksheet that is pre-formatted, the format is maintained. After the data is inserted from your application to Excel, you can carry out any conditional formatting using a (pre-recorded) macro in the worksheet. You can connect to Excel using ADO with the two OLE DB Providers that are a part of MDAC: Microsoft Jet OLE DB Provider or Microsoft OLE DB Provider for ODBC Drivers. Well focus on Jet OLE DB Provider, which can be used to access data in Excel workbooks through installable Indexed Sequential Access Method (ISAM) drivers. Tip: See the  Beginners Course to Delphi ADO Database Programming  if youre new to ADO. The ConnectionString Magic The ConnectionString property tells ADO how to connect to the datasource. The value used for ConnectionString consists of one or more arguments ADO uses to establish the connection. In Delphi, the TADOConnection component encapsulates the ADO connection object; it can be shared by multiple ADO dataset (TADOTable, TADOQuery, etc.) components through their Connection properties. In order to connect to Excel, a valid connection string involves only two additional  pieces of information -  the full path to the workbook and the Excel file version. A legitimate connection string could look like this: ConnectionString : ProviderMicrosoft.Jet.OLEDB.4.0;Data SourceC:\MyWorkBooks\myDataBook.xls;Extended PropertiesExcel 8.0;; When connecting to an external database format supported by the Jet, the extended properties for the connection needs to be set. In our case, when connecting to an Excel database, extended properties are used to set the Excel file version.   For an Excel95 workbook, this value is Excel 5.0 (without the quotes); use Excel 8.0 for Excel 97, Excel 2000, Excel 2002, and ExcelXP. Important:  You must use the Jet 4.0 Provider since Jet 3.5 does not support the ISAM drivers. If you set the Jet Provider to version 3.5, youll receive the Couldnt find installable ISAM error. Another Jet extended property is HDR. HDRYes means that there is a header row in the range, so the Jet will not include the first row of the selection into the dataset. If HDRNo is specified, then the provider will include the first row of the range (or named range) into the dataset. The first row in a range is considered to be the header row by default (HDRYes). Therefore, if you have column heading, you do not need to specify this value. If you do not have column headings, you need to specify HDRNo. Now that youre all set, this is the part where things become interesting since were now ready for some code. Lets see how to create a simple Excel Spreadsheet editor using Delphi and ADO. Note:  You should proceed even if you lack knowledge on ADO and Jet programming. As youll see, editing an Excel workbook is as simple as editing data from any standard database.

Thursday, December 19, 2019

Essay on Should Justice be the Supreme Virtue of Societies

Should Justice be the Supreme Virtue of Societies? Social justice is distributive. It operates under the principle that each person must get his or her due. However, it is quite contentious as to precisely what each persons due is and thus opens the debate as to what justice is. Moreover, once a definition of justice is agreed upon (in a particular state), the question may be raised of how important it is. Is justice salient, or is there another concept that transcends its authority? Some argue that an aggregative concept would best suit a first principle (if indeed there were one). I would argue that justice is indeed salient, that without it there would be no such thing as civil society and†¦show more content†¦The conclusion that may be drawn from this is rather more subtle. It is that justice is derived from a starting point of equality. Social Contract theorists such as Rousseau and Locke, suggest that this equal starting point is an imaginary one whereby individuals come together and give all that they possess, both physically and non-physically to the State. They do this because they realise that if everybody gives equally (i.e. everything) then nobody loses anything, as the state (which is constituted by the individuals) possesses all things. From here on it is possible to provide protection by the state, and those objects that were once possessions now become property. More recently, John Rawls has taken a slightly different approach to this classic Contract Theory. Rawls argues that if we take people in an original position we would find that rational people would choose a set of principles that would call justice fairness. This original position that he refers to is a hypothetical situation in which rational people were held behind a veil of ignorance in that their destined social status and wealth would not be known. He argues that the persons in the original position would choose two rather different principles: the first requires equality in the assignment of basic rights and duties,Show MoreRelatedPlato And Aristotle On Justice And Law1565 Words   |  7 Pageslaws should be supreme over each citizen including the ruler(s). In their writings, Plato and Aristotle focused on justice and law, and the reasons they are important in society. Throughout history, many leaders have looked to these writings in hopes of establishing order and discip line in their nation through law. Although Plato and Aristotle ruled in a world ruled by men, they contributed to the idea of the rule of law, because they explained that laws should be just and the punishment should beRead MoreJudgement On Clean Air Or Money1343 Words   |  6 PagesUnited States Supreme Court ruled to maintain the power of the EPA to regulate the pollutants including carbon dioxide, discharge from the power plants and even crossing the states lines. It was a good news for people who live in downwind states. Many people considered that it was a huge victory for Obama administration and EPA. The judgement of Supreme Court is completely reasonable. The case will be analysis in an ethical way. I believe that government as a social manager should have authorityRead MoreThe Ethics Of Nicomachean Ethics1367 Words   |  6 Pagesmany situations. Aristotle purposes that all human beings work toward a supreme happiness or good, this good is coined as â€Å"eudemonia† and this ultimate happiness is not a state to which one can enter it is more of an activity, which must be practiced. A main point of Aristotle’s basic ethics that can start off the summary and explanation of Nicomachean ethics is understanding that Aristotle thought that the goal of humans should be to achieve their true nature and actualize their potential. This trueRead MoreEmpiricism Is The Theory That Experience1202 Words   |  5 Pagesand political theorists have developed two different ideas on what politics should be about and how a government should be ran: politics should be about making citizens more virtuous vs politics should be about the â€Å"basics† like security and property rights. Throughout this paper, I will be analyzing these two different outlooks on politics and presenting a case for both. Thomas Hobbes believed that the government should essentially limit itself to the protection of property and persons. HobbesRead MoreMedical Ethics Essay997 Words   |  4 Pagesintroduction on the Senate floor to the challenge in the Supreme Court that it was unconstitutional. The reforms that the AHA started in 2010, such as Health Insurance Companies can not deny someone with a preexisting condition, or the recent troubles of the Health Insurance Marketplace website, AHA is something of a hot button issues that has US citizens deeply divided on. At the heart of this divisive issue is Universal Healthcare something that should be provided by government for its citizens or is itRead MorePlato Vs Aristotle : Determining Good1668 Words   |  7 Pagesbelieve in universal form. He believes that every concept or object should be studied individually to be completely understood. When proving concepts, Plato thought that through reason and experiments, a concept can be proven. Aristotle wanted direct observation and experience to prove a concept. In this paper I will argue that Aristotle’s perspective on determining good is better and fits better in peoples actions within today’s society. Plato’s idealistic views on determining a good person representRead MoreThe French Revolution1460 Words   |  6 PagesPublic Safety, the effective governing body of France during the most radical phase of the revolution. The leaders of this revolution attempted, perhaps more than any other revolutionary leaders before or since, to totally transform human society in every way. (Supreme Being) Although Robespierre began with patriotic intent he still was the face of the Reign of Terror and was viewed as being a radical person. On February 5,1794 Robespierre wrote a speech justifying the use of terror in the French governmentRead MoreAnalysis Of Theater Of The Oppressed By Augusto Boal1476 Words   |  6 Pagesand specifically theatre as an act of pure contemplation. Others felt that theatre was a vision of society in transformation and thus is political because it can demonstrate the implementation of change or how change can be delayed. Boal continues by mentioning Plato’s position that poets should be banished from society because â€Å"poetry only makes sense when it exalts the figures and deeds that should serve as examples† (Boal 12). He further describes how Plato views theater as an imitation of thingsRead MoreConfucian Values in Relation to Filipino Values1287 Words   |  6 Pagesother things affect our beliefs. One uses various types of ethics when surrounded by different groups. Knowing between right and wrong is a good foundation to practice goo ethics and morals. These thin gs make morals, ethics and values important in society. many factors can contribute to what we think is morally right or wrong. Religion, for example, may create a barrier on to what extent we do something. Some religions set rules, or guidelines on which they limit what we do. Cultures as well contributeRead MoreThe Importance Of An Age880 Words   |  4 Pagesto buy cigarettes, and all males under federal law must sign up for the draft and potentially could give-up their life defending this great nation. By virtue of turning 18 years old, a person inherits so many responsibilities which apply across most of the country, many of these responsibilities explained by Cynthia D. Kinser, Chief Justice, Supreme Court of Virginia (2011) have far more responsibility than a 16-year-old working at a fast food restaurant. While there is a need for limiting the number

Tuesday, December 10, 2019

Xerox Persuasive Essay Example For Students

Xerox Persuasive Essay The Xerox Movement IPC 560Communication and ChangeJoe D. PhearseInstructor: Dr. Gayle PohlCentral Michigan University, Schofield Barracks, Hi 96857The Xerox Movement Xerox from its inception has always been regarded as an organization that thrives on innovation and diversification. The introduction of the their xerographic office copier in 1959 is seen as one the main technological advancements in the 20th Century. Even as late as the 1990s Xerox has been boldly reinventing itself from a predominantly black and white, light lens copier company to a digital, color and document solutions company. Even the release of their third quarter results for 2001 in October, showed despite a 5% drop in revenue, the organization still looks forward to improving its overall strategy by revealing a new turnaround program Our actions are centered on improved cash flow and profitability and at the same time strengthening our strategic core- Mark Bernstein- Interim CEO This plan provides Xerox with a strong financial foundation, to build on the unique strength inherent in our brand, market position, technology, people and leadership team Anne Mulcahy-Chairman ; Chief Operating Office. Mission StatementXerox Mission Statement Our strategic intent is to help people find better ways to do great work by constantly leading in a document technologies, products and services that improve our customers work processes and business results. Xerox operates under the guidance of six core values:1.We succeed though satisfied customers2.We value and empower employees3.We deliver quality and excellence in all we do. 4.We provide superior return to our shareholders5.We use technology to deliver market leadership6.We behave responsibly as a corporate citizen. Xerox, with 78,900 employees worldwide and revenues in excess of $17 billion, is the global leader in the document management business, offering the widest array of innovative document solutions, services and systems -including color and black and white printers, digital presses, multifunction devices and digital copiers designed for offices and production printing environments. It also offers supplies, software, and support. Xerox and their need to become innovative, Xerox had enjoyed what could be almost described as a monopoly when they introduced their xerographic office copier in 1959. The Company pinpointed markets where it would capture the high profit margins and concentrated its sales on these markets. Xerox removed itself from the low-end business focusing its attention on the middle-volume markets and high-volume markets, with dev elopment of a product to meet these markets. The Company grew at a prodigious rate but with a problem of becoming internally oriented, in the sense that with no competitors of any notable size, it depended on its own standards and its own internal competition as a means to quantify performance and achievement. But Xerox reliance on its own monopoly was to be its own debasement. With the eventual removal of its monopoly in 1973, there was a surge from other corporations to challenge them for the markets. Xerox was always a corporation who relied on producing innovative products, but this diversification was often to no effect. In 1969, Xerox diversified after acquiring the Scientific Data Systems Company, which manufactured mainframe computers. This particular venture backfired as the minicomputer was introduced and the requirement for the larger mainframe computers lessened. A newly formed office products divisions introduced a word processor and a workstation, each of which failed to take off for different reasons. In the interim Japanese competitors established a solid position within the low-volume markets and turned its attention to the more profitable medium high volume markets. By the start of the 80s, Xerox was losing significant market share to its Japanese competitors. Not only were the Japanese products excellent, they were sold cheaper than Xerox could manufacture them. Xerox market share dropped from nearly 100% in the 60s to below 50% in 1980. It was this threat that changed the way Xerox was to focus in the future. For a long time, Western Companies rationalized Japans success to low labor costs, the Japanese work ethic, lifetime employment and other factors. Japan had simply developed vastly superior products, practices and processes. Xerox had to look outside its particular functions to identify the best competitors and how they did certain things, be it cost, quality or product reliability. The work for the 1980s

Tuesday, December 3, 2019

Xerox free essay sample

1) What is the culture of the organization? It has been said that Xerox has a famously strong culture. It is a culture of integrity, openness, and inclusion. One of the defining characteristics of the Fortune 500 Company is passion. Passion for success, new ideas, customer service and passion within its employees. The Xerox culture is one of commitment to excellence, innovation and sustainability. We will write a custom essay sample on Xerox or any similar topic specifically for you Do Not WasteYour Time HIRE WRITER Only 13.90 / page Xerox operates on its core values of succeeding through satisfied customer, delivering quality and excellence in all they do, requiring premium return on assets, using technology to develop market leadership, valuing their employees and behaving responsibly as a corporate citizen. 2) How do you know that this is the culture (i.e., what are the signs of the culture)? We know this is the culture based on Xerox’s mission and vision statements. We see evidence of the culture in Xerox’s business practices for which they have won many honors and accolades in the areas of ethics, diversity, innovation and sustainability. 3) What caused the organization to have this culture? The founding principles and values laid the foundation Xerox’s culture. Under various leaders Xerox’s culture has tweaked from time to time. Also, Xerox’s dedication and commitment to their mission and success has caused them to have their culture. 4) What is the effect of the culture on the organization, the employees, and on society (make sure you address all three groups)? The effect of the culture on the organization is a positive one. The culture has allowed the organization to experience growth and expansion. The company’s commitment to providing quality consumer services has allowed it to remain one of the highest grossing fortune 500 companies year after year, The effect on its employees is also a positive one. According to their website Xerox treats its employees as they would stakeholders. They make their employees a part of the innovation process so they feel a shared sense of achievement and importance. Former Xerox employees said that the company helped them achieved their goals by supporting continuing education course, tuition reimbursement so employees can work while going to school. Xerox has made Etisphere Institute’s World’s Most Ethical Company list in 2013. Xerox prides itself on being a responsible corporate citizen. Xerox subscribes to the Electronic Industry Citizen Coalition and Xerox’s business code of conduct is available in 13 languages. Xerox is also committed to  environmental sustainability and has adopted greener business practices such as driving fewer miles, recycling, reducing greenhouse gas emissions, and using more efficient technologies. The Xerox Foundation is a program which gives back to the community. Xerox also has many science and technology education initiatives aimed at nurturing innovators in local communities. 5) Can the culture be changed? While the founding values of the Xerox Corporation will never change I believe that the culture can be changed. As a matter of fact the culture has changed over time under various CEO leaderships. Most recently former CEO Anne Mulcahy has been credited with bringing Xerox back from the brink of collapse by creating a stronger and more focused company by empowering its employees. Current CEO Ursula Burns said that she is aiming to change the culture again by making employees more fearless and frank. Maybe the â€Å"Xerox family,† she says, should act a bit more like a real family. â€Å"When we’re in the family, you don’t have to be as nice as when you’re outside of the family,† she says. â€Å"I want us to stay civil and kind, but we have to be frank — and the reason we can be frank is because we are all in the same family.†