Microscopic calculations of weak interaction rates of nuclei in stellar environment for A = 18 to 100